On Wed 26-06-19 19:19:20, Tetsuo Handa wrote: > 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? I am sorry but I do not really see how this is related to this particular patch. Are you suggesting that has_intersects_mems_allowed is racy? More racy now? -- Michal Hocko SUSE Labs