Re: [PATCH v5] mm/oom_kill.c: futex: Close a race between do_exit and the oom_reaper

From: Davidlohr Bueso
Date: Mon Mar 21 2022 - 20:42:46 EST


On Mon, 21 Mar 2022, Michal Hocko wrote:

The more I am thinking about this the more I am getting convinced that
we should rather approach this differently and skip over vmas which can
be holding the list. Have you considered this option?

While I tend to agree with this over a hacky trylock approach, I cannot
help but think that v3 was the right thing to do, at least conceptually.
Robust futex users here care enough about dealing with crashes while holding
a lock that they sacrifice the performance of regular futexes. So the OOM
killer should not cause this very thing. I went through previous threads
but other than the user base (which I don't think would be very large
just because of the performance implications), was there any other reason
to no just set MMF_OOM_SKIP upon a robust list?

Thanks,
Davidlohr