lkml.org 
[lkml]   [2005]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] quieten OOM killer noise

    Why not just remove the printk's when DEBUG_KERNEL is off. The problem
    that I've found is that the latency in the system sky rockets when OOM
    triggers. It's due to the excessive printk usage.

    I'm sure it's not ifdef'ed for a reason , but it would be nice to have an
    easy way to silence it.

    Daniel

    On Sun, 24 Jul 2005, Anton Blanchard wrote:

    >
    > We now print statistics when invoking the OOM killer, however this
    > information is not rate limited and you can get into situations where
    > the console is continually spammed.
    >
    > For example, when a task is exiting the OOM killer will simply return
    > (waiting for that task to exit and clear up memory). If the VM
    > continually calls back into the OOM killer we get thousands of copies of
    > show_mem() on the console.
    >
    > Use printk_ratelimit() to quieten it.
    >
    > Signed-off-by: Anton Blanchard <anton@samba.org>
    >
    > Index: foobar2/mm/oom_kill.c
    > ===================================================================
    > --- foobar2.orig/mm/oom_kill.c 2005-07-02 15:56:13.000000000 +1000
    > +++ foobar2/mm/oom_kill.c 2005-07-04 01:38:59.474324542 +1000
    > @@ -258,9 +258,11 @@
    > struct mm_struct *mm = NULL;
    > task_t * p;
    >
    > - printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
    > - /* print memory stats */
    > - show_mem();
    > + if (printk_ratelimit()) {
    > + printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
    > + /* print memory stats */
    > + show_mem();
    > + }
    >
    > read_lock(&tasklist_lock);
    > retry:
    > -
    > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    > Please read the FAQ at http://www.tux.org/lkml/
    >

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-07-03 19:30    [W:0.026 / U:29.112 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site