X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Foom_kill.c;h=1e56076672f5870e9766753270d77442e5743ac9;hb=6eb396dc4a9781c5e7951143ab56ce5710687ab3;hp=4bbb1cb10495ea486db83868055762888835c8b3;hpb=79befd0c08c4766f8fa27e37ac2a70e40840a56a;p=linux-2.6 diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 4bbb1cb104..1e56076672 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -253,11 +253,17 @@ static struct mm_struct *oom_kill_process(struct task_struct *p) * OR try to be smart about which process to kill. Note that we * don't have to be perfect here, we just have to be good. */ -void out_of_memory(unsigned int __nocast gfp_mask) +void out_of_memory(unsigned int __nocast gfp_mask, int order) { struct mm_struct *mm = NULL; task_t * p; + if (printk_ratelimit()) { + printk("oom-killer: gfp_mask=0x%x, order=%d\n", + gfp_mask, order); + show_mem(); + } + read_lock(&tasklist_lock); retry: p = select_bad_process(); @@ -268,12 +274,9 @@ retry: /* Found nothing?!?! Either we hang forever, or we panic. */ if (!p) { read_unlock(&tasklist_lock); - show_free_areas(); panic("Out of memory and no killable processes...\n"); } - printk("oom-killer: gfp_mask=0x%x\n", gfp_mask); - show_free_areas(); mm = oom_kill_process(p); if (!mm) goto retry;