diff options
author | Shakeel Butt <shakeel.butt@linux.dev> | 2024-12-09 20:06:57 -0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-12-10 09:25:39 +0100 |
commit | b7ffecbe198e2dfc44abf92ceb90f46150f7527a (patch) | |
tree | f8222df12f2743fa5e8e63e138d81176b01c2967 /mm/page_reporting.c | |
parent | 40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff) | |
download | linux-stable-b7ffecbe198e2dfc44abf92ceb90f46150f7527a.tar.gz linux-stable-b7ffecbe198e2dfc44abf92ceb90f46150f7527a.tar.bz2 linux-stable-b7ffecbe198e2dfc44abf92ceb90f46150f7527a.zip |
memcg: slub: fix SUnreclaim for post charged objects
Large kmalloc directly allocates from the page allocator and then use
lruvec_stat_mod_folio() to increment the unreclaimable slab stats for
global and memcg. However when post memcg charging of slab objects was
added in commit 9028cdeb38e1 ("memcg: add charging of already allocated
slab objects"), it missed to correctly handle the unreclaimable slab
stats for memcg.
One user visisble effect of that bug is that the node level
unreclaimable slab stat will work correctly but the memcg level stat can
underflow as kernel correctly handles the free path but the charge path
missed to increment the memcg level unreclaimable slab stat. Let's fix
by correctly handle in the post charge code path.
Fixes: 9028cdeb38e1 ("memcg: add charging of already allocated slab objects")
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/page_reporting.c')
0 files changed, 0 insertions, 0 deletions