From: Christoph Lameter <clameter@sgi.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linux-mm@kvack.org, nacc@us.ibm.com, lee.schermerhorn@hp.com,
bob.picco@hp.com, mel@skynet.ie
Subject: Re: [BUG] at mm/slab.c:3320
Date: Mon, 7 Jan 2008 21:38:51 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0801072131350.28725@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20080108104016.4fa5a4f3.kamezawa.hiroyu@jp.fujitsu.com>
On Tue, 8 Jan 2008, KAMEZAWA Hiroyuki wrote:
> In usual alloc_pages() allocator, this is done by zonelist fallback.
Hmmm... __cache_alloc_node does:
if (unlikely(!cachep->nodelists[nodeid])) {
/* Node not bootstrapped yet */
ptr = fallback_alloc(cachep, flags);
goto out;
}
So kmalloc_node does the correct fallback.
Kmalloc does not fall back but relies on numa_node_id() referring to a
node that has ZONE_NORMAL memory. Sigh.
cache_alloc_refill:
node = numa_node_id();
check_irq_off();
ac = cpu_cache_get(cachep);
retry:
batchcount = ac->batchcount;
if (!ac->touched && batchcount > BATCHREFILL_LIMIT) {
/*
* If there was little recent activity on this cache, then
* perform only a partial refill. Otherwise we could generate
* refill bouncing.
*/
batchcount = BATCHREFILL_LIMIT;
}
l3 = cachep->nodelists[node];
BUG_ON(ac->avail > 0 || !l3);
^^^^ triggers
> complicated ?
Hmm.. We could check for l3 == NULL and fail in that case? The
___cache_alloc would fail and __do_cache_alloc would call
___cache_alloc_node whicvh would provide the correct fallback.
Doesd this fix it?
---
mm/slab.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6/mm/slab.c
===================================================================
--- linux-2.6.orig/mm/slab.c 2008-01-07 21:37:34.000000000 -0800
+++ linux-2.6/mm/slab.c 2008-01-07 21:38:09.000000000 -0800
@@ -2977,7 +2977,10 @@ retry:
}
l3 = cachep->nodelists[node];
- BUG_ON(ac->avail > 0 || !l3);
+ if (!l3)
+ return NULL;
+
+ BUG_ON(ac->avail > 0);
spin_lock(&l3->list_lock);
/* See if we can refill from the shared array */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-08 5:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071220100541.GA6953@skywalker>
2007-12-25 22:05 ` [BUG] at mm/slab.c:3320 Andrew Morton
2007-12-27 15:32 ` Aneesh Kumar K.V
2007-12-27 19:31 ` Christoph Lameter
[not found] ` <20071228051959.GA6385@skywalker>
[not found] ` <Pine.LNX.4.64.0801021227580.20331@schroedinger.engr.sgi.com>
2008-01-03 15:50 ` Aneesh Kumar K.V
2008-01-04 0:33 ` Nishanth Aravamudan
2008-01-07 1:23 ` KAMEZAWA Hiroyuki
2008-01-07 18:10 ` Christoph Lameter
2008-01-08 1:40 ` KAMEZAWA Hiroyuki
2008-01-08 5:38 ` Christoph Lameter [this message]
2008-01-08 7:11 ` Aneesh Kumar K.V
2008-01-09 6:50 ` Nishanth Aravamudan
2008-01-09 17:50 ` Christoph Lameter
2008-01-09 18:58 ` Aneesh Kumar K.V
2008-01-09 19:23 ` Christoph Lameter
2008-01-09 21:47 ` Nishanth Aravamudan
2008-01-09 21:51 ` Christoph Lameter
2008-01-09 22:13 ` Nishanth Aravamudan
2008-01-10 0:02 ` Christoph Lameter
2008-01-17 12:31 ` Pekka Enberg
2008-01-17 14:32 ` Christoph Lameter
2008-01-17 14:36 ` Pekka J Enberg
2008-01-17 15:05 ` Christoph Lameter
2008-01-17 15:25 ` Aneesh Kumar K.V
2008-01-17 16:58 ` Christoph Lameter
2008-01-17 17:42 ` Aneesh Kumar K.V
2008-01-17 21:40 ` Mel Gorman
2008-01-17 20:47 ` Pekka J Enberg
2008-01-20 0:58 ` Mel Gorman
2008-01-22 20:20 ` Christoph Lameter
2008-01-10 4:13 ` Aneesh Kumar K.V
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.0801072131350.28725@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=bob.picco@hp.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--cc=nacc@us.ibm.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;
as well as URLs for NNTP newsgroup(s).