Skip to content
Commit be458311 authored by Roman Gushchin's avatar Roman Gushchin Committed by Linus Torvalds
Browse files

mm: memcg/slab: fix slab statistics in !SMP configuration

Since commit ea426c2a

 ("mm: memcg: prepare for byte-sized vmstat
items") the write side of slab counters accepts a value in bytes and
converts it to pages.  It happens in __mod_node_page_state().

However a non-SMP version of __mod_node_page_state() doesn't perform
this conversion.  It leads to incorrect (unrealistically high) slab
counters values.  Fix this by adding a similar conversion to the non-SMP
version of __mod_node_page_state().

Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
Reported-and-tested-by: default avatarBastian Bittorf <bb@npl.de>
Fixes: ea426c2a

 ("mm: memcg: prepare for byte-sized vmstat items")
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 472e5b05
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment