提交 42639269 编写于 作者: A Anton Blanchard 提交者: Linus Torvalds

[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: NAnton Blanchard <anton@samba.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 37b173a4
......@@ -258,9 +258,11 @@ void out_of_memory(unsigned int __nocast gfp_mask, int order)
struct mm_struct *mm = NULL;
task_t * p;
printk("oom-killer: gfp_mask=0x%x, order=%d\n", gfp_mask, order);
/* print memory stats */
show_mem();
if (printk_ratelimit()) {
printk("oom-killer: gfp_mask=0x%x, order=%d\n",
gfp_mask, order);
show_mem();
}
read_lock(&tasklist_lock);
retry:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册