Messages in this thread | | | Date | Mon, 2 Nov 2009 17:39:12 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [RFC][-mm][PATCH 4/6] oom-killer: fork bomb detector |
| |
On Mon, 2 Nov 2009 16:27:16 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > - > - /* Try to kill a child first */ > + if (fork_bomb) { > + printk(KERN_ERR "possible fork-bomb is detected. kill them\n"); > + /* We need to kill the youngest one, at least */ > + rcu_read_lock(); > + for_each_process_reverse(c) { > + if (c == p) > + break; > + if (is_forkbomb_family(c, p)) { > + oom_kill_task(c); > + break; > + } > + } > + rcu_read_unlock(); > + }
Kosaki said we should kill all under tree and "break" is unnecessay here. I nearly agree with him..after some experiments.
But it seems the biggest problem is latecy by swap-out...before deciding OOM ....
Thanks, -Kame
| |