Messages in this thread | | | Subject | Re: [RFC/PATCH v2] mm: Introduce GFP_PANIC for non-failing allocations | From | Pekka Enberg <> | Date | Fri, 08 May 2009 17:39:49 +0300 |
| |
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!
| |