[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1607131659190.92037@chino.kir.corp.google.com>
Date: Wed, 13 Jul 2016 17:01:37 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
cc: Mikulas Patocka <mpatocka@...hat.com>,
Michal Hocko <mhocko@...nel.org>,
Ondrej Kozina <okozina@...hat.com>,
Jerome Marchand <jmarchan@...hat.com>,
Stanislav Kozina <skozina@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: System freezes after OOM
On Wed, 13 Jul 2016, Tetsuo Handa wrote:
> I wonder whether commit f9054c70d28bc214 ("mm, mempool: only set
> __GFP_NOMEMALLOC if there are free elements") is doing correct thing.
> It says
>
> If an oom killed thread calls mempool_alloc(), it is possible that it'll
> loop forever if there are no elements on the freelist since
> __GFP_NOMEMALLOC prevents it from accessing needed memory reserves in
> oom conditions.
>
> but we can allow mempool_alloc(__GFP_NOMEMALLOC) requests to access
> memory reserves via below change, can't we? The purpose of allowing
> ALLOC_NO_WATERMARKS via TIF_MEMDIE is to make sure current allocation
> request does not to loop forever inside the page allocator, isn't it?
This would defeat the purpose of __GFP_NOMEMALLOC for oom killed threads,
so you'd need to demonstrate that isn't a problem for the current users
and then change the semantics of the gfp flag.
> Why we need to allow mempool_alloc(__GFP_NOMEMALLOC) requests to use
> ALLOC_NO_WATERMARKS when TIF_MEMDIE is not set?
>
mempool_alloc(__GFP_NOMEMALLOC) is forbidden.
Powered by blists - more mailing lists