]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcg/slab: fix slab statistics in !SMP configuration
authorRoman Gushchin <guro@fb.com>
Thu, 1 Oct 2020 20:07:49 +0000 (13:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Oct 2020 16:13:41 +0000 (09:13 -0700)
commit9e1ea0df38e569f9d7c914fcfe13c0638541b93f
treeced755d5f88226d5aea7a14a38864b23656b94a7
parent6ca72c6bcd5249302875b245f6dcf4ecc345405f
mm: memcg/slab: fix slab statistics in !SMP configuration

Since commit 3c138f66441a ("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: Roman Gushchin <guro@fb.com>
Reported-and-tested-by: Bastian Bittorf <bb@npl.de>
Fixes: 3c138f66441a ("mm: memcg: prepare for byte-sized vmstat items")
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/vmstat.h