public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] quieten OOM killer noise
@ 2005-07-23 15:02 Anton Blanchard
  2005-07-05 12:15 ` Thread_Id RVK
  0 siblings, 1 reply; 22+ messages in thread
From: Anton Blanchard @ 2005-07-23 15:02 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel


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:

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2005-07-15  6:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4mfcK-UT-25@gated-at.bofh.it>
     [not found] ` <4mUJ1-5ZG-23@gated-at.bofh.it>
2005-07-06  2:47   ` Thread_Id Robert Hancock
2005-07-14  5:33     ` Thread_Id RVK
2005-07-14  7:45       ` Thread_Id Arjan van de Ven
2005-07-14 10:06         ` Thread_Id RVK
2005-07-14 10:30           ` Thread_Id Arjan van de Ven
2005-07-14 11:20             ` Thread_Id RVK
2005-07-14 12:25               ` Thread_Id Arjan van de Ven
2005-07-14 12:39                 ` Thread_Id Jakub Jelinek
2005-07-14 13:08                   ` Thread_Id Benedikt Spranger
2005-07-14 13:49                   ` Thread_Id RVK
2005-07-14 10:39           ` Thread_Id Ian Campbell
2005-07-14 11:02             ` Thread_Id RVK
2005-07-14 11:16               ` Thread_Id Ian Campbell
2005-07-14 11:24                 ` Thread_Id RVK
2005-07-14 23:02                   ` Thread_Id J.A. Magallon
2005-07-15  6:09                     ` Thread_Id RVK
2005-07-15  6:18                       ` Thread_Id Ian Campbell
2005-07-14 14:28               ` Thread_Id Robert Hancock
2005-07-23 15:02 [PATCH] quieten OOM killer noise Anton Blanchard
2005-07-05 12:15 ` Thread_Id RVK
2005-07-05 12:55   ` Thread_Id Arjan van de Ven
2005-07-07 12:43   ` Thread_Id Benedikt Spranger
2005-07-14  5:31     ` Thread_Id RVK

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox