From: Dave Hansen <dave@linux.vnet.ibm.com>
To: paulus@samba.org
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>,
Mel Gorman <mel@csn.ul.ie>, Dave Hansen <dave@linux.vnet.ibm.com>,
linuxppc-dev@ozlabs.org, "Serge E. Hallyn" <serue@us.ibm.com>
Subject: [PATCH 3/8] cleanup careful_allocation(): bootmem already panics
Date: Tue, 09 Dec 2008 10:21:33 -0800 [thread overview]
Message-ID: <20081209182133.B06DD407@kernel> (raw)
In-Reply-To: <20081209182130.DB2150A2@kernel>
If we fail a bootmem allocation, the bootmem code itself
panics. No need to redo it here.
Also change the wording of the other panic. We don't
strictly have to allocate memory on the specified node.
It is just a hint and that node may not even *have* any
memory on it. In that case we can and do fall back to
other nodes.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---
linux-2.6.git-dave/arch/powerpc/mm/numa.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff -puN arch/powerpc/mm/numa.c~cleanup-careful_allocation arch/powerpc/mm/numa.c
--- linux-2.6.git/arch/powerpc/mm/numa.c~cleanup-careful_allocation 2008-12-09 10:16:05.000000000 -0800
+++ linux-2.6.git-dave/arch/powerpc/mm/numa.c 2008-12-09 10:16:05.000000000 -0800
@@ -836,7 +836,7 @@ static void __init *careful_allocation(i
ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM());
if (!ret)
- panic("numa.c: cannot allocate %lu bytes on node %d",
+ panic("numa.c: cannot allocate %lu bytes for node %d",
size, nid);
/*
@@ -856,10 +856,6 @@ static void __init *careful_allocation(i
ret = (unsigned long)__alloc_bootmem_node(NODE_DATA(new_nid),
size, align, 0);
- if (!ret)
- panic("numa.c: cannot allocate %lu bytes on node %d",
- size, new_nid);
-
ret = __pa(ret);
dbg("alloc_bootmem %lx %lx\n", ret, size);
_
next prev parent reply other threads:[~2008-12-09 18:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 18:21 [PATCH 0/8] Fix a bug and cleanup NUMA boot-time code Dave Hansen
2008-12-09 18:21 ` [PATCH 1/8] fix bootmem reservation on uninitialized node Dave Hansen
2008-12-10 22:14 ` Paul Mackerras
2008-12-10 22:30 ` Jon Tollefson
2008-12-10 22:54 ` Dave Hansen
2008-12-09 18:21 ` [PATCH 2/8] Add better comment on careful_allocation() Dave Hansen
2008-12-09 18:21 ` Dave Hansen [this message]
2008-12-09 18:21 ` [PATCH 4/8] make careful_allocation() return vaddrs Dave Hansen
2008-12-09 18:21 ` [PATCH 5/8] cleanup careful_allocation(): consolidate memset() Dave Hansen
2008-12-09 18:21 ` [PATCH 6/8] cleanup do_init_bootmem() Dave Hansen
2008-12-09 21:54 ` Serge E. Hallyn
2008-12-16 5:06 ` Paul Mackerras
2008-12-09 18:21 ` [PATCH 7/8] less use of NODE_DATA() Dave Hansen
2008-12-16 5:16 ` Paul Mackerras
2008-12-09 18:21 ` [PATCH 8/8] make free_bootmem_with_active_regions() take pgdat Dave Hansen
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=20081209182133.B06DD407@kernel \
--to=dave@linux.vnet.ibm.com \
--cc=kniht@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mel@csn.ul.ie \
--cc=paulus@samba.org \
--cc=serue@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).