[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1607181858020.16586@chino.kir.corp.google.com>
Date: Mon, 18 Jul 2016 19:00:57 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Michal Hocko <mhocko@...nel.org>
cc: linux-mm@...ck.org, Mikulas Patocka <mpatocka@...hat.com>,
Ondrej Kozina <okozina@...hat.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Mel Gorman <mgorman@...e.de>, Neil Brown <neilb@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, dm-devel@...hat.com,
Michal Hocko <mhocko@...e.com>
Subject: Re: [RFC PATCH 1/2] mempool: do not consume memory reserves from
the reclaim path
On Mon, 18 Jul 2016, Michal Hocko wrote:
> David Rientjes was objecting that such an approach wouldn't help if the
> oom victim was blocked on a lock held by process doing mempool_alloc. This
> is very similar to other oom deadlock situations and we have oom_reaper
> to deal with them so it is reasonable to rely on the same mechanism
> rather inventing a different one which has negative side effects.
>
Right, this causes oom livelock as described in the aforementioned thread:
the oom victim is waiting on a mutex that is held by a thread doing
mempool_alloc(). The oom reaper is not guaranteed to free any memory, so
nothing on the system can allocate memory from the page allocator.
I think the better solution here is to allow mempool_alloc() users to set
__GFP_NOMEMALLOC if they are in a context which allows them to deplete
memory reserves.
Powered by blists - more mailing lists