Re: [patch 1/2] mm, memcg: avoid oom notification when current needs access to memory reserves
From: Andrew Morton <hidden>
Date: 2014-01-08 00:25:12
Also in:
linux-mm, lkml
On Thu, 19 Dec 2013 15:41:34 +0100 Michal Hocko [off-list ref] wrote:
On Wed 18-12-13 22:09:12, David Rientjes wrote:quoted
On Wed, 18 Dec 2013, Michal Hocko wrote:quoted
quoted
For memory isolation, we'd only want to bypass memcg charges when absolutely necessary and it seems like TIF_MEMDIE is the only case where that's required. We don't give processes with pending SIGKILLs or those in the exit() path access to memory reserves in the page allocator without first determining that reclaim can't make any progress for the same reason and then we only do so by setting TIF_MEMDIE when calling the oom killer.While I do understand arguments about isolation I would also like to be practical here. How many charges are we talking about? Dozen pages? Much more?The PF_EXITING bypass is indeed much less concerning than the fatal_signal_pending() bypass.
I just spent a happy half hour reliving this thread and ended up deciding I agreed with everyone! I appears that many more emails are needed so I think I'll drop http://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch for now. The claim that mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch will impact existing userspace seems a bit dubious to me.
OK, so can we at least agree on the patch posted here: https://lkml.org/lkml/2013/12/12/129. This is a real bug and definitely worth fixing.
Yes, can we please get Eric's bug fixed? I don't believe that Eric has tested either https://lkml.org/lkml/2013/12/12/129 or http://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch. Is he the only person who can reproduce this?