[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091102173912.601790b0.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 2 Nov 2009 17:39:12 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"kosaki.motohiro@...fujitsu.com" <kosaki.motohiro@...fujitsu.com>,
aarcange@...hat.com, akpm@...ux-foundation.org,
minchan.kim@...il.com, rientjes@...gle.com, vedran.furac@...il.com,
"hugh.dickins@...cali.co.uk" <hugh.dickins@...cali.co.uk>
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists