]> git.ipfire.org Git - thirdparty/linux.git/commit
mm: memcg: dump memcg protection info on oom or alloc failures
authorShakeel Butt <shakeel.butt@linux.dev>
Fri, 7 Nov 2025 23:40:41 +0000 (15:40 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 20 Nov 2025 21:43:59 +0000 (13:43 -0800)
commitbc8e51c05ad50a5a0b02114d3cc94d151a332595
treef4fb70d09c8fd6a0ada55921d0a7b58d1c065cb8
parent05be0287955970b043a0742e85b6c285dea4f286
mm: memcg: dump memcg protection info on oom or alloc failures

Currently kernel dumps memory state on oom and allocation failures.  One
of the question usually raised on those dumps is why the kernel has not
reclaimed the reclaimable memory instead of triggering oom.  One potential
reason is the usage of memory protection provided by memcg.  So, let's
also dump the memory protected by the memcg in such reports to ease the
debugging.

Link: https://lkml.kernel.org/r/20251107234041.3632644-1-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/oom_kill.c
mm/page_alloc.c