Re: [PATCH v4 2/3] mm/oom_kill: Only delay OOM reaper for processes using robust futexes
From: Davidlohr Bueso
Date: Tue Aug 19 2025 - 23:18:52 EST
On Tue, 19 Aug 2025, Michal Hocko wrote:
On Mon 18-08-25 20:08:19, zhongjinji wrote:
If a process holding robust futexes gets frozen, robust futexes might be reaped before
futex_cleanup() runs when an OOM occurs. I am not sure if this will actually happen.
Yes, and 2s delay will never rule that out. Especially for frozen tasks
which could be frozen undefinitely. That is not the point I have tried
to make. I was suggesting not treating futex specially because no matter
what we do this will always be racy and a hack to reduce the risk. We
simply cannot deal with that case more gracefully without a major
surgery to the futex implementation which is not desirable for this
specific reason.
Yeah, relying on time as a fix is never a good idea. I was going to suggest
skipping the reaping for tasks with a robust list, but that still requires
the racy check, and your suggested workaround seems more practical.
Thanks,
Davidlohr