On 2019/06/26 15:55, Michal Hocko wrote: > I think that VM_BUG_ON in has_intersects_mems_allowed is over protective > and it makes the rest of the code a bit more convoluted than necessary. > Is there any reason we just do the check and return true there? Btw. > has_intersects_mems_allowed sounds like a misnomer to me. It suggests > to be a more generic function while it has some memcg implications which > are not trivial to spot without digging deeper. I would go with > oom_cpuset_eligible or something along those lines. Is "mempolicy_nodemask_intersects(tsk) returning true when tsk already passed mpol_put_task_policy(tsk) in do_exit()" what we want? If tsk is an already exit()ed thread group leader, that thread group is needlessly selected by the OOM killer because mpol_put_task_policy() returns true?