lkml.org 
[lkml]   [2009]   [May]   [3]   [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,9 @@ nopage:
> dump_stack();
> show_mem();
> }
> - return page;
> + if (unlikely(gfp_mask & __GFP_PANIC))
> + panic("Out of memory: panic due to __GFP_PANIC\n");
> + return NULL;
> got_pg:
> if (kmemcheck_enabled)
> kmemcheck_pagealloc_alloc(page, order, gfp_mask);
>

If we really want a __GFP_PANIC flag for this purpose, I'd recommend also
emitting the order and gfpmask in the panic() message since it may not be
immediately obvious from the caller.


\
 
 \ /
  Last update: 2009-05-03 23:01    [W:0.097 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site