Re: [PATCH v2] slab,slub: ignore __GFP_WAIT if we're booting or suspending

From: Nick Piggin
Date: Thu Jun 25 2009 - 00:42:04 EST


On Fri, Jun 12, 2009 at 08:30:05AM -0700, Andrew Morton wrote:
> On Fri, 12 Jun 2009 14:34:00 +0300 Pekka Enberg <penberg@xxxxxxxxxxxxxx> wrote:
>
> > +static gfp_t slab_gfp_mask __read_mostly = __GFP_BITS_MASK & ~__GFP_WAIT;
>
> It'd be safer and saner to disable __GFP_FS and __GFP_IO as well.
> Having either of those flags set without __GFP_WAIT is a somewhat
> self-contradictory thing and there might be code under reclaim which
> assumes that __GFP_FS|__GFP_IO implies __GFP_WAIT.
>
> <wonders why mempool_alloc() didn't clear __GFP_FS>

Maybe we never get there if __GFP_WAIT is clear? It would be neater
if it did clear __GFP_FS, though...

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/