All of lore.kernel.org
 help / color / mirror / Atom feed
* kmemleak not play well with low memory situation
@ 2018-12-30  5:25 Qian Cai
  2019-01-02 16:08 ` [PATCH] kmemleak: survive in a low-memory situation Qian Cai
  0 siblings, 1 reply; 10+ messages in thread
From: Qian Cai @ 2018-12-30  5:25 UTC (permalink / raw)
  To: Catalin Marinas, Linux-MM

When in low memory situation with swapping, kmemleak quickly disable itself due
to cannot allocate a kmemleak_object structure. If kmemleak could hold a bit
longer, the system will trigger OOM soon to free up the memory. This is a bit
tricky to solve because in __alloc_pages_slowpath() even though it has
GFP_NOFAIL, it would fail allocation due to no GFP_DIRECT_RECLAIM,

/* Caller is not willing to reclaim, we can't balance anything */
if (!can_direct_reclaim)
	goto nopage;

if (WARN_ON_ONCE(!can_direct_reclaim))
	goto fail;

If adding GFP_DIRECT_RECLAIM to kmemleak_alloc(), it will trigger endless
warnings in slab_pre_alloc_hook(),

might_sleep_if(gfpflags_allow_blocking(flags));

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-08  3:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30  5:25 kmemleak not play well with low memory situation Qian Cai
2019-01-02 16:08 ` [PATCH] kmemleak: survive in a low-memory situation Qian Cai
2019-01-02 16:59   ` Catalin Marinas
2019-01-02 18:06     ` [PATCH v2] " Qian Cai
2019-01-03  9:32       ` Michal Hocko
2019-01-03 16:51         ` Qian Cai
2019-01-03 17:07           ` Michal Hocko
2019-01-07 10:43             ` Catalin Marinas
2019-01-08  2:06               ` Qian Cai
2019-01-08  3:49                 ` Qian Cai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.