On Tue 11-02-25 11:04:21, Shakeel Butt wrote: > On Tue, Feb 11, 2025 at 08:18:19AM +0000, Chen Ridong wrote: [...] > Wouldn't it be more robust if we put an upper bound on the else case of > above condition i.e. fix number of retries? As you have discovered there > is a hidden dependency on the forward progress of oom_reaper and this > check/code-path which I think is not needed. Any OOM path has a dependency on oom_reaper or task exiting. Is there any reason why this path should be any special? With cond_resched we can look for a day where this will be just removed and the code will still work. With a number of retries we will have a non-deterministic time dependent behavior because number of retries rather than fwd progress would define the failure mode. -- Michal Hocko SUSE Labs