lkml.org 
[lkml]   [2009]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/PATCH v2] mm: Introduce GFP_PANIC for non-failing allocations
From
Date
Hi Rik,

On Fri, 2009-05-08 at 10:37 -0400, Rik van Riel wrote:
> > @@ -1556,7 +1556,8 @@ nofail_alloc:
> > zonelist, high_zoneidx, ALLOC_NO_WATERMARKS);
> > if (page)
> > goto got_pg;
> > - if (gfp_mask & __GFP_NOFAIL) {
> > + /* GFP_PANIC sets both flags */
> > + if ((gfp_mask & __GFP_NOFAIL) && !(gfp_mask & __GFP_NORETRY)) {
> > congestion_wait(WRITE, HZ/50);
>
> Do you mean ((gfp_mask & GFP_PANIC) == GFP_PANIC)) ?

No, we only want to loop if __GFP_NOFAIL is set but __GFP_NORETRY is not
set.

>
> > @@ -1670,6 +1671,9 @@ nopage:
> > dump_stack();
> > show_mem();
> > }
> > + if (unlikely(gfp_mask & GFP_PANIC))
> > + panic("Out of memory: %s order: %d, gfp_mask:0x%x\n",
> > + p->comm, order, gfp_mask);
>
> Ditto here.

Yes, indeed. Fixed up. Thanks!



\
 
 \ /
  Last update: 2009-05-08 16:43    [W:0.056 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site