Re: [patch v2] mm, oom: fix concurrent munlock and oom reaper unmap

From: David Rientjes
Date: Thu Apr 19 2018 - 15:14:13 EST


On Thu, 19 Apr 2018, Tetsuo Handa wrote:

> current code has a possibility that the OOM reaper is disturbed by
> unpredictable dependencies, like I worried that
>
> I think that there is a possibility that the OOM reaper tries to reclaim
> mlocked pages as soon as exit_mmap() cleared VM_LOCKED flag by calling
> munlock_vma_pages_all().
>
> when current approach was proposed.

That's exactly the issue that this patch is fixing, yes. If you brought
that possibility up then I'm sorry that it was ignored.