aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-07-07 20:56:06 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:36 -0400
commit42639269f9ce4aac2e6c20bcbca30b5da8b9a899 (patch)
tree1583ac4da9d2e40669d4579e338d8e506dedba5a /mm/oom_kill.c
parent37b173a4d03d1681e6c9529bc43d7a3308132db6 (diff)
[PATCH] mm: quieten OOM killer noise
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index e20d559edbaf..1e56076672f5 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -258,9 +258,11 @@ void out_of_memory(unsigned int __nocast gfp_mask, int order)
258 struct mm_struct *mm = NULL; 258 struct mm_struct *mm = NULL;
259 task_t * p; 259 task_t * p;
260 260
261 printk("oom-killer: gfp_mask=0x%x, order=%d\n", gfp_mask, order); 261 if (printk_ratelimit()) {
262 /* print memory stats */ 262 printk("oom-killer: gfp_mask=0x%x, order=%d\n",
263 show_mem(); 263 gfp_mask, order);
264 show_mem();
265 }
264 266
265 read_lock(&tasklist_lock); 267 read_lock(&tasklist_lock);
266retry: 268retry: