]> Git Repo - linux.git/commit - mm/util.c
mm: fix global NR_SLAB_.*CLAIMABLE counter reads
authorJohannes Weiner <[email protected]>
Thu, 10 Aug 2017 22:23:31 +0000 (15:23 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 Aug 2017 22:54:06 +0000 (15:54 -0700)
commitd507e2ebd2c7be9138e5cf5c0cb1931c90c42ab1
tree3ee794865430f69ddfba9d87a876bf3f497ad249
parent26273939ace935dd7553b31d279eab30b40f7b9a
mm: fix global NR_SLAB_.*CLAIMABLE counter reads

As Tetsuo points out:
 "Commit 385386cff4c6 ("mm: vmstat: move slab statistics from zone to
  node counters") broke "Slab:" field of /proc/meminfo . It shows nearly
  0kB"

In addition to /proc/meminfo, this problem also affects the slab
counters OOM/allocation failure info dumps, can cause early -ENOMEM from
overcommit protection, and miscalculate image size requirements during
suspend-to-disk.

This is because the patch in question switched the slab counters from
the zone level to the node level, but forgot to update the global
accessor functions to read the aggregate node data instead of the
aggregate zone data.

Use global_node_page_state() to access the global slab counters.

Fixes: 385386cff4c6 ("mm: vmstat: move slab statistics from zone to node counters")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Johannes Weiner <[email protected]>
Reported-by: Tetsuo Handa <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Stefan Agner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/meminfo.c
kernel/power/snapshot.c
mm/page_alloc.c
mm/util.c
This page took 0.057983 seconds and 4 git commands to generate.