All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-mm <linux-mm@kvack.org>
Subject: [PATCH] x86: fix booting non-NUMA system with NUMA config
Date: Fri, 11 Mar 2005 12:37:51 -0800	[thread overview]
Message-ID: <1110573471.557.73.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.61.0503111922520.9403@goblin.wat.veritas.com>

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

On Fri, 2005-03-11 at 19:25 +0000, Hugh Dickins wrote:
> This used to work fine, but around the time your abstract discontigmem
> patches went into -mm, the resulting kernel failed to boot - blank
> screen after grub for a few seconds, until it reboots again.  And now
> your patches have just gone into mainline, that resulting kernel fails
> to boot.  I've not done a binary search to identify any one of your
> patches as the culprit, but you are my Number One suspect ;)

Hugh, you caught me.  There is, indeed, a bug booting with
CONFIG_NUMA=y, CONFIG_X86_GENERICARCH=y, and booting on a non-NUMA
system.  While not the most common configuration, it should surely be
supported.

memmap_init_zone() is the first user to do pfn_to_nid(), which relies on
physnode_map[] to be done properly.  memory_present() was supposed to do
that, but never got called for the flat configuration, so pfn_to_nid()
was returning -1 on valid pages.

Andrew, please apply and forward the attached patch on to Linus.  It
affects code currently in -bk.

Test compiled and booted on 4-way non-NUMA x86 system.

-- Dave

[-- Attachment #2: memory_present_for_flat.patch --]
[-- Type: text/x-patch, Size: 609 bytes --]



---

 memhotplug-dave/arch/i386/mm/discontig.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN arch/i386/mm/discontig.c~memory_present_for_flat arch/i386/mm/discontig.c
--- memhotplug/arch/i386/mm/discontig.c~memory_present_for_flat	2005-03-11 12:29:45.000000000 -0800
+++ memhotplug-dave/arch/i386/mm/discontig.c	2005-03-11 12:30:04.000000000 -0800
@@ -121,6 +121,7 @@ int __init get_memcfg_numa_flat(void)
 	find_max_pfn();
 	node_start_pfn[0] = 0;
 	node_end_pfn[0] = max_pfn;
+	memory_present(0, 0, max_pfn);
 
         /* Indicate there is one node available. */
 	nodes_clear(node_online_map);
_

       reply	other threads:[~2005-03-11 20:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.61.0503111922520.9403@goblin.wat.veritas.com>
2005-03-11 20:37 ` Dave Hansen [this message]
2005-03-11 21:19   ` [PATCH] x86: fix booting non-NUMA system with NUMA config Hugh Dickins

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=1110573471.557.73.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.