From: Christoph Lameter <clameter@sgi.com>
To: Jay Cliburn <jacliburn@bellsouth.net>
Cc: Paul Jackson <pj@sgi.com>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] commit 3c517a61, slab: better fallback allocation behavior
Date: Mon, 11 Dec 2006 09:37:23 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612110930180.500@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0612110855380.500@schroedinger.engr.sgi.com>
Ahh. Fallback_alloc() does not do the check for GFP_WAIT as done in
cache_grow(). Thus interrupts are disabled when we call kmem_getpages()
which results in the failure.
Duplicate the handling of GFP_WAIT in cache_grow().
Jay could you try this patch?
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6/mm/slab.c
===================================================================
--- linux-2.6.orig/mm/slab.c 2006-12-11 09:25:57.000000000 -0800
+++ linux-2.6/mm/slab.c 2006-12-11 09:34:08.000000000 -0800
@@ -3252,6 +3252,7 @@
struct zone **z;
void *obj = NULL;
int nid;
+ gfp_t local_flags = (flags & GFP_LEVEL_MASK);
retry:
/*
@@ -3275,7 +3276,12 @@
* We may trigger various forms of reclaim on the allowed
* set and go into memory reserves if necessary.
*/
+ if (local_flags & __GFP_WAIT)
+ local_irq_enable();
+ kmem_flagcheck(cache, flags);
obj = kmem_getpages(cache, flags, -1);
+ if (local_flags & __GFP_WAIT)
+ local_irq_disable();
if (obj) {
/*
* Insert into the appropriate per node queues
next prev parent reply other threads:[~2006-12-11 17:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 19:49 Jay Cliburn
2006-12-10 20:49 ` Paul Jackson
2006-12-10 22:14 ` Andrew Morton
2006-12-11 17:13 ` Christoph Lameter
2006-12-11 17:37 ` Christoph Lameter [this message]
2006-12-11 19:41 ` Jay Cliburn
2006-12-12 18:57 ` Paul Jackson
2006-12-12 19:22 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0612110930180.500@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=jacliburn@bellsouth.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®