Messages in this thread | | | Date | Sun, 3 May 2009 13:58:49 -0700 (PDT) | From | David Rientjes <> | Subject | Re: 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.
| |