From: Andy Whitcroft <apw@shadowen.org>
To: Paul Mackerras <paulus@samba.org>
Cc: akpm@osdl.org, Mel Gorman <mel@csn.ul.ie>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Anton Blanchard <anton@samba.org>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177!
Date: Fri, 20 Oct 2006 15:18:52 +0100 [thread overview]
Message-ID: <4538DACC.5050605@shadowen.org> (raw)
In-Reply-To: <17720.30804.180390.197567@cargo.ozlabs.ibm.com>
Paul Mackerras wrote:
> Christoph Lameter writes:
>
>> The page allocator must be running and able to serve pages from the boot
>> node. This fails for some reason and the slab cannot bootstrap. The memory
>> not available is the first guess. Could you trace the allocation in the
>> page allocator (__alloc_pages) when the slab attempts to bootstrap and
>> figure out why exactly the allocation fails?
>
> What is happening is that all pages are getting their zone id field in
> their page->flags set to point to zone for node 1 by memmap_init_zone
> calling set_page_links (which does set_page_zone). Thus, when those
> pages get freed by free_all_bootmem_node, they all end up in the zone
> for node 1.
>
> memmap_init_zone is called (as memmap_init, since we don't have
> __HAVE_ARCH_MEMMAP_INIT defined) from init_currently_empty_zone, which
> is called from free_area_init_core. Now the thing is that memmap_init
> and init_currently_empty_zone are called with the node's start PFN and
> size in pages, *including* holes. On the partition I'm using we have
> these PFN ranges for the nodes:
>
> 1: 0 -> 32768
> 0: 32768 -> 278528
> 1: 278528 -> 524288
>
> So node 0's start PFN is 32768 and its size is 245760 pages, and so we
> correctly set pages 32786 to 278527 to be in the zone for node 0.
> Then for node 1, we have the start PFN is 0 and the size is 524288, so
> we then go through and set *all* pages of memory to be in the zone for
> node 1, including the pages which are actually on node 0.
>
> That's why we can't allocate any pages on node 0, and the kmem cache
> bootstrapping blows up.
>
> I don't know this code well enough to know what the correct fix is.
> Clearly memmap_init_zone should only be touching the pages that are
> actually present in the zone, but I don't know exactly what data
> structures it should be using to know what those pages are.
Mel Gorman and I have been poking at this from different ends. Mel from
the context of this thread and myself trying to fix a machine which was
exhibiting on 32MB of ram in node 0 and the rest in node 1.
I remember that we used to have code to cope with this in the ppc64
architecture, indeed I remember reviewing it all that time ago. Looking
at the current state of the tree it was removed in the two patches below
in mainline:
"[PATCH] Remove SPAN_OTHER_NODES config definition"
"[PATCH] mm: remove arch independent NODES_SPAN_OTHER_NODES"
These commits:
f62859bb6871c5e4a8e591c60befc8caaf54db8c
a94b3ab7eab4edcc9b2cb474b188f774c331adf7
I'll follow up to this email with the reversion patch we used in
testing. It seems to sort this problem out at least, though now its
blam'ing in ibmveth, so am retesting with yet another patch. This patch
reverts the two patches above and updates the commentry on the Kconfig
entry.
-apw
next prev parent reply other threads:[~2006-10-20 14:57 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-13 18:41 kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Will Schmidt
2006-10-13 19:05 ` Christoph Lameter
2006-10-13 19:53 ` Will Schmidt
2006-10-13 20:57 ` Will Schmidt
2006-10-13 21:22 ` Nathan Lynch
2006-10-13 21:34 ` Anton Blanchard
2006-10-13 22:01 ` Mike Kravetz
2006-10-13 22:22 ` Christoph Lameter
2006-10-16 16:00 ` Will Schmidt
2006-10-16 19:20 ` Will Schmidt
2006-10-16 19:25 ` Christoph Lameter
2006-10-16 20:50 ` Will Schmidt
2006-10-16 23:37 ` Christoph Lameter
2006-10-18 6:11 ` Paul Mackerras
2006-10-18 15:12 ` Christoph Lameter
2006-10-18 21:19 ` Paul Mackerras
2006-10-18 21:26 ` Christoph Lameter
2006-10-18 21:49 ` Christoph Lameter
2006-10-19 5:03 ` Paul Mackerras
2006-10-19 16:16 ` Christoph Lameter
2006-10-19 16:30 ` Anton Blanchard
2006-10-19 16:49 ` Christoph Lameter
2006-10-19 22:23 ` Paul Mackerras
2006-10-19 22:31 ` Christoph Lameter
2006-10-20 7:18 ` Paul Mackerras
2006-10-20 14:18 ` Andy Whitcroft [this message]
2006-10-20 14:59 ` Mike Kravetz
2006-10-20 15:19 ` Will Schmidt
2006-10-20 16:00 ` Andy Whitcroft
2006-10-20 17:09 ` Andrew Morton
2006-10-20 17:46 ` Christoph Lameter
2006-10-20 18:07 ` Andy Whitcroft
2006-10-20 17:13 ` Will Schmidt
[not found] ` <8a76dfd735e544016c5f04c98617b87d@pinky>
2006-10-20 16:30 ` [PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc Mel Gorman
2006-10-20 17:34 ` kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Christoph Lameter
2006-10-20 22:54 ` Paul Mackerras
2006-10-19 17:03 ` Christoph Lameter
2006-10-19 18:07 ` Christoph Lameter
2006-10-19 20:37 ` Will Schmidt
2006-10-19 21:28 ` Christoph Lameter
2006-10-19 21:43 ` Will Schmidt
2006-10-19 22:00 ` Christoph Lameter
2006-10-19 21:39 ` Christoph Lameter
2006-10-19 20:38 ` Will Schmidt
2006-10-19 21:30 ` Christoph Lameter
2006-10-18 16:06 ` 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=4538DACC.5050605@shadowen.org \
--to=apw@shadowen.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mel@csn.ul.ie \
--cc=paulus@samba.org \
/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).