On Sun 28-08-22 13:50:09, Yu Zhao wrote: > On Tue, Aug 23, 2022 at 2:36 AM Michal Hocko <mhocko@xxxxxxxx> wrote: [...] > > You cannot really make any > > assumptions about oom_reaper and how quickly it is going to free the > > memory. > > Agreed. But here we are talking about heuristics, not dependencies on > certain behaviors. Assume we are playing a guessing game: there are > multiple mm_structs available for reclaim, would the oom-killed ones > be more profitable on average? I'd say no, because I assume it's more > likely than unlikely that the oom reaper is doing/to do its work. Note > that the assumption is about likelihood, hence arguably valid. Well, my main counter argument would be that we do not really want to carve last resort mechanism (which the oom reaper is) into any heuristic because any future changes into that mechanism will be much harder to justify and change. There is a cost of the maintenance that should be considered. While you might be right that this change would be beneficial, there is no actual proof of that. Historically we've had several examples of such a behavior which was really hard to change later on because the effect would be really hard to evaluate. -- Michal Hocko SUSE Labs