Re: [PATCH 1/2] oom: do not live lock on frozen tasks

From: David Rientjes
Date: Tue Sep 27 2011 - 14:30:23 EST


On Tue, 27 Sep 2011, Michal Hocko wrote:

> I guess you mean a situation when select_bad_process picks up a process
> which is not marked as frozen yet but we send SIGKILL right before
> schedule is called in refrigerator.
> In that case either schedule should catch it by signal_pending_state
> check or we will pick it up next OOM round when we pick up the same
> process (if nothing else is eligible). Or am I missing something?
>

That doesn't close the race, the oom killer will see the presence of an
eligible TIF_MEMDIE thread in select_bad_process() and simply return to
the page allocator. You'd need to thaw it there as well and hope that
nothing now or in the future will get into an endless thaw-freeze-thaw
loop in the exit path.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/