On Tue, 8 Jun 2010, KOSAKI Motohiro wrote: > > Reviewers may observe that the previous implementation would iterate > > through the children and attempt to kill each until one was successful and > > then the parent if none were found while the new code simply kills the > > most memory-hogging task or the parent. Note that the only time > > oom_kill_task() fails, however, is when a child does not have an mm or has > > a /proc/pid/oom_adj of OOM_DISABLE. badness() returns 0 for both cases, > > so the final oom_kill_task() will always succeed. > > probably we need to call has_intersects_mems_allowed() in this loop. likes > > /* Try to sacrifice the worst child first */ > do { > list_for_each_entry(c, &t->children, sibling) { > unsigned long cpoints; > > if (c->mm == p->mm) > continue; > if (oom_unkillable(c, mem, nodemask)) > continue; > > /* oom_badness() returns 0 if the thread is unkillable */ > cpoints = oom_badness(c); > if (cpoints > victim_points) { > victim = c; > victim_points = cpoints; > } > } > } while_each_thread(p, t); > > > It mean we shouldn't assume parent and child have the same mems_allowed, > perhaps. > I'd be happy to have that in oom_kill_process() if you pass the enum oom_constraint and only do it for CONSTRAINT_CPUSET. Please add a followup patch to my latest patch series. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>