[RFC PATCH] slab: __GFP_NOWARN not being propagated from mempool_alloc()

From: Miklos Szeredi
Date: Mon Nov 24 2008 - 16:53:59 EST


We see page allocation failure warnings on the mempool_alloc() path.
See this lkml posting for example:

http://lkml.org/lkml/2008/10/27/100

The cause is that on NUMA, alloc_slabmgmt() clears __GFP_NOWARN,
together with __GFP_THISNODE and __GFP_NORETRY. But AFAICS it really
only wants to clear __GFP_THISNODE.

Does this patch looks good?

Warning: it's completely untested.

Miklos
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/mm/slab.c
===================================================================
--- linux-2.6.orig/mm/slab.c 2008-10-24 12:40:34.000000000 +0200
+++ linux-2.6/mm/slab.c 2008-11-24 22:17:04.000000000 +0100
@@ -2609,7 +2609,8 @@ static struct slab *alloc_slabmgmt(struc
if (OFF_SLAB(cachep)) {
/* Slab management obj is off-slab. */
slabp = kmem_cache_alloc_node(cachep->slabp_cache,
- local_flags & ~GFP_THISNODE, nodeid);
+ local_flags & ~__GFP_THISNODE,
+ nodeid);
if (!slabp)
return NULL;
} else {
--
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/