From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Christoph Lameter <clameter@sgi.com>,
Pekka J Enberg <penberg@cs.helsinki.fi>,
linux-kernel@vger.kernel.org
Subject: [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc
Date: Thu, 4 Jan 2007 17:49:00 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0701041741490.16466@blonde.wat.veritas.com> (raw)
pdflush hit the BUG_ON(!PageSlab(page)) in kmem_freepages called from
fallback_alloc: cache_grow already freed those pages when alloc_slabmgmt
failed. But it wouldn't have freed them if __GFP_NO_GROW, so make sure
fallback_alloc doesn't waste its time on that case.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
___
Fixes a CONFIG_NUMA regression introduced in 2.6.20-rc1. Or you may
feel it's cleaner for cache_grow to skip its kmem_freepages when objp
is input: patch below is slightly simpler, but I've no strong feeling.
mm/slab.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 2.6.20-rc3/mm/slab.c 2007-01-01 10:30:46.000000000 +0000
+++ linux/mm/slab.c 2007-01-04 17:30:11.000000000 +0000
@@ -3281,7 +3281,7 @@ retry:
flags | GFP_THISNODE, nid);
}
- if (!obj) {
+ if (!obj && !(flags & __GFP_NO_GROW)) {
/*
* This allocation will be performed within the constraints
* of the current cpuset / memory policy requirements.
@@ -3310,7 +3310,7 @@ retry:
*/
goto retry;
} else {
- kmem_freepages(cache, obj);
+ /* cache_grow already freed obj */
obj = NULL;
}
}
next reply other threads:[~2007-01-04 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 17:49 Hugh Dickins [this message]
2007-01-04 18:23 ` Pekka Enberg
2007-01-04 18:43 ` Christoph Lameter
2007-01-04 20:51 ` Pekka J Enberg
2007-01-04 20:57 ` Christoph Lameter
2007-01-04 18:57 ` Hugh Dickins
2007-01-04 19:20 ` Pekka Enberg
2007-01-04 18:41 ` 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.0701041741490.16466@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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®