aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 e20d559..1e56076 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)
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: