linux/kernel/power
Johannes Weiner d507e2ebd2 mm: fix global NR_SLAB_.*CLAIMABLE counter reads
As Tetsuo points out:
 "Commit 385386cff4 ("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: 385386cff4 ("mm: vmstat: move slab statistics from zone to node counters")
Link: http://lkml.kernel.org/r/20170801134256.5400-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Stefan Agner <stefan@agner.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-08-10 15:54:06 -07:00
..
Kconfig
Makefile
autosleep.c
console.c
hibernate.c PM: hibernate: constify attribute_group structures. 2017-06-29 23:05:48 +02:00
main.c PM / sleep: constify attribute_group structures 2017-07-04 22:01:16 +02:00
power.h arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX 2017-02-07 12:32:52 -08:00
poweroff.c
process.c ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle 2017-06-15 00:55:44 +02:00
qos.c
snapshot.c mm: fix global NR_SLAB_.*CLAIMABLE counter reads 2017-08-10 15:54:06 -07:00
suspend.c ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle 2017-06-15 00:55:44 +02:00
suspend_test.c PM / sleep: Fix test_suspend after sleep state rework 2017-02-18 02:16:27 +01:00
swap.c block: switch bios to blk_status_t 2017-06-09 09:27:32 -06:00
user.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
wakelock.c