From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Alex Chiang <achiang@hp.com>,
penberg@cs.helsinki.fi, linux-ia64@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: SLUB ia64 linux-next crash bisected to 756dee75
Date: Fri, 15 Jan 2010 15:35:21 -0500 [thread overview]
Message-ID: <1263587721.20615.255.camel@useless.americas.hpqcorp.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1001151358110.6590@router.home>
On Fri, 2010-01-15 at 14:07 -0600, Christoph Lameter wrote:
> Another stab at the problem:
>
> We have the following code in init_kmem_cache_nodes()
>
> if (slab_state >= UP)
> local_node = page_to_nid(virt_to_page(s));
> else
> local_node = 0;
>
>
> If the slab bootstrap is complete (UP) (which is the case here) then
> the structure pointing to by s was allocated using kmalloc itself. So
> virt_to_page() works for the typical.
>
> The changeset results in the use of a statically allocated structure
> after boot is complete. Now page_to_nid(virt_to_page(s)) runs on a
> global data address.
>
> Could this be problematic for some reasons on IA64?
Dunno. Alex or I will check and get back to you.
>
> The following patch makes init_kmem_cache_nodes assume 0
> for statically allocated kmem_cache structures even after
> boot is complete.
I believe that on Alex's platform, the kernel will get loaded into "node
2", the hardware interleaved pseudo-node, because it's located at phys
0..., and has sufficient space. So, this might not work here.
>
> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
>
> ---
> mm/slub.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/mm/slub.c
> ===================================================================
> --- linux-2.6.orig/mm/slub.c 2010-01-15 14:02:54.000000000 -0600
> +++ linux-2.6/mm/slub.c 2010-01-15 14:04:47.000000000 -0600
> @@ -2176,7 +2176,8 @@ static int init_kmem_cache_nodes(struct
> int node;
> int local_node;
>
> - if (slab_state >= UP)
> + if (slab_state >= UP &&
> s < kmalloc_caches &&
> + s > kmalloc_caches + KMALLOC_CACHES)
??? can this ever be so? for positive KMALLOC_CACHES, I mean...
> local_node = page_to_nid(virt_to_page(s));
> else
> local_node = 0;
>
>
>
>
--
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:[~2010-01-15 20:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 0:29 Alex Chiang
2010-01-13 14:59 ` Christoph Lameter
2010-01-14 0:53 ` Alex Chiang
2010-01-14 15:01 ` Christoph Lameter
2010-01-14 18:01 ` Alex Chiang
2010-01-14 15:18 ` Christoph Lameter
2010-01-14 18:22 ` Alex Chiang
2010-01-14 19:17 ` Pekka Enberg
2010-01-14 20:32 ` Alex Chiang
2010-01-14 20:58 ` Christoph Lameter
2010-01-14 21:29 ` Alex Chiang
2010-01-14 21:31 ` Pekka Enberg
2010-01-14 21:59 ` Christoph Lameter
2010-01-14 22:01 ` Christoph Lameter
2010-01-15 20:07 ` Christoph Lameter
2010-01-15 20:35 ` Lee Schermerhorn [this message]
2010-01-15 23:32 ` Christoph Lameter
2010-01-19 18:53 ` Christoph Lameter
2010-01-19 20:02 ` Alex Chiang
2010-01-19 20:29 ` Christoph Lameter
2010-01-19 21:29 ` Alex Chiang
2010-01-19 21:50 ` Christoph Lameter
2010-01-20 22:46 ` Alex Chiang
2010-01-21 21:47 ` Alex Chiang
2010-01-21 22:45 ` Christoph Lameter
2010-01-21 23:05 ` Alex Chiang
2010-01-21 23:43 ` Christoph Lameter
2010-01-22 0:15 ` Alex Chiang
2010-01-22 14:43 ` Christoph Lameter
2010-01-22 16:37 ` Pekka Enberg
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=1263587721.20615.255.camel@useless.americas.hpqcorp.net \
--to=lee.schermerhorn@hp.com \
--cc=achiang@hp.com \
--cc=cl@linux-foundation.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-mm@kvack.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