lkml.org 
[lkml]   [2009]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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



    \
     
     \ /
      Last update: 2009-11-02 09:45    [W:3.839 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site