Re: [patch] mm, oom: stop reclaiming if GFP_ATOMIC will start failing soon

From: Tetsuo Handa
Date: Mon Apr 27 2020 - 01:03:36 EST


On 2020/04/27 12:12, David Rientjes wrote:
> Tetsuo: the specific allocation that triggers a page allocation failure is
> not interesting; we have tens of thousands of examples. Each example is
> simply the unlucky last GFP_ATOMIC allocation that fails; the interesting
> point is the amount of free memory. In other words, when free memory is
> below ALLOC_HIGH watermarks, we assume that we have depleted memory
> reserves *faster* than when user allocations started to fail. In the
> interest of userspace being responsive, we should oom kill here.

My interest is, which function (and which process if process context) is [ab]using
GFP_ATOMIC (or __GFP_MEMALLOC) allocations enough to hit memory allocation failure.
GFP_NOWAIT (or __GFP_NOMEMALLOC) could be used if that allocation can't sleep and
can't shortly recover free memory.