lkml.org 
[lkml]   [2009]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: introducing __GFP_PANIC
From
Date
On Mon, 2009-05-04 at 13:08 +0400, Cyrill Gorcunov wrote:
> Index: linux-2.6.git/mm/oom_kill.c
> =====================================================================
> --- linux-2.6.git.orig/mm/oom_kill.c
> +++ linux-2.6.git/mm/oom_kill.c
> @@ -422,6 +422,16 @@ static int oom_kill_process(struct task_
> return oom_kill_task(p);
> }
>
> +void oom_panic(gfp_t gfp_mask, unsigned int order)
> +{
> + if (likely(!(gfp_mask & __GFP_PANIC)))
> + return;
> +
> + panic("Out of memory: panic due to __GFP_PANIC.\n"
> + "%s order:%d, mode:0x%x\n", current->comm,
> + order, gfp_mask);
> +}

I think this just makes things harder to follow. It has one call-site so
why not inline this there?



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