Re: [PATCH] mm, oom: remove sleep from under oom_lock

From: David Rientjes
Date: Tue Jul 10 2018 - 17:12:32 EST


On Tue, 10 Jul 2018, David Rientjes wrote:

> I think it's better, thanks. However, does it address the question about
> why __oom_reap_task_mm() needs oom_lock protection? Perhaps it would be
> helpful to mention synchronization between reaping triggered from
> oom_reaper and by exit_mmap().
>

Actually, can't we remove the need to take oom_lock in exit_mmap() if
__oom_reap_task_mm() can do a test and set on MMF_UNSTABLE and, if already
set, bail out immediately?