X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Fslub.c;h=819f056b39c6f27100e8b89f91acc42b3c5f5bd6;hp=ce62b770e2fc5399e53dcc9c91ec5220820fc977;hb=ba52270d18fb17ce2cf176b35419dab1e43fe4a3;hpb=1053414068bad659479e6efa62a67403b8b1ec0a diff --git a/mm/slub.c b/mm/slub.c index ce62b770e2fc..819f056b39c6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1085,11 +1085,17 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) { struct page *page; struct kmem_cache_order_objects oo = s->oo; + gfp_t alloc_gfp; flags |= s->allocflags; - page = alloc_slab_page(flags | __GFP_NOWARN | __GFP_NORETRY, node, - oo); + /* + * Let the initial higher-order allocation fail under memory pressure + * so we fall-back to the minimum order allocation. + */ + alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL; + + page = alloc_slab_page(alloc_gfp, node, oo); if (unlikely(!page)) { oo = s->min; /*