[PATCH 04/16] mm: allow PF_MEMALLOC from softirq context

2012-07-11 Thread Mel Gorman
This is needed to allow network softirq packet processing to make use of PF_MEMALLOC. Currently softirq context cannot use PF_MEMALLOC due to it not being associated with a task, and therefore not having task flags to fiddle with - thus the gfp to alloc flag mapping ignores the task flags when in

Re: [PATCH 04/16] mm: allow PF_MEMALLOC from softirq context

2012-07-10 Thread Mel Gorman
On Mon, Jul 09, 2012 at 06:57:10PM +0200, Sebastian Andrzej Siewior wrote: > On Mon, Jul 09, 2012 at 11:04:42AM +0100, Mel Gorman wrote: > > > - lets assume your allocation happens with kmalloc() without > > > __GFP_MEMALLOC > > > and current->flags has PF_MEMALLOC ORed and your SLAB pool is emp

Re: [PATCH 04/16] mm: allow PF_MEMALLOC from softirq context

2012-07-09 Thread Sebastian Andrzej Siewior
On Mon, Jul 09, 2012 at 11:04:42AM +0100, Mel Gorman wrote: > > - lets assume your allocation happens with kmalloc() without __GFP_MEMALLOC > > and current->flags has PF_MEMALLOC ORed and your SLAB pool is empty. This > > forces SLAB to allocate more pages from the buddy allocator with it will

Re: [PATCH 04/16] mm: allow PF_MEMALLOC from softirq context

2012-07-09 Thread Mel Gorman
On Sun, Jul 08, 2012 at 08:12:11PM +0200, Sebastian Andrzej Siewior wrote: > On Wed, Jun 27, 2012 at 09:26:14AM +0100, Mel Gorman wrote: > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > > > index b6c0727..5c6d9c6 100644 > > > > --- a/mm/page_alloc.c > > > > +++ b/mm/page_alloc.c > > > > @

Re: [PATCH 04/16] mm: allow PF_MEMALLOC from softirq context

2012-07-08 Thread Sebastian Andrzej Siewior
On Wed, Jun 27, 2012 at 09:26:14AM +0100, Mel Gorman wrote: > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > > index b6c0727..5c6d9c6 100644 > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -2265,7 +2265,11 @@ gfp_to_alloc_flags(gfp_t gfp_mask) > > > if (likely(!(gfp_mask