lkml.org 
[lkml]   [2009]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: introducing __GFP_PANIC
On Mon, 4 May 2009, Cyrill Gorcunov wrote:

> @@ -1685,7 +1687,12 @@ nopage:
> dump_stack();
> show_mem();
> }
> - return page;
> + if (unlikely((gfp_mask & __GFP_PANIC))) {

Too many parentheses and this doesn't need the unnecessary braces.

> + panic("Out of memory: panic due to __GFP_PANIC.\n"
> + "%s order:%d, mode:0x%x\n", p->comm,
> + order, gfp_mask);

The extra newline in this statement doesn't seem necessary, it's just one
less line that will be visible on the frozen screen. I also think calling
this 'gfp_mask' instead of 'mode' is more appropriate just like the oom
killer does.

> + }
> + return NULL;
> got_pg:
> if (kmemcheck_enabled)
> kmemcheck_pagealloc_alloc(page, order, gfp_mask);
>


\
 
 \ /
  Last update: 2009-05-04 12:59    [W:0.094 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site