From: Haicheng Li <haicheng.li@linux.intel.com>
To: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@redhat.com>, Yinghai Lu <yinghai@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] x86: set hotpluggable nodes in nodes_possible_map
Date: Thu, 21 Jan 2010 10:58:37 +0800 [thread overview]
Message-ID: <4B57C2DD.3050402@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1001201152040.30528@chino.kir.corp.google.com>
David Rientjes wrote:
> On Thu, 21 Jan 2010, Haicheng Li wrote:
>
>> let's add more changes to fix naming issue as well since it's too confusing
>> for people to understand
>> the code logic. how about below patch?
>
> That should be a seperate change; there's a bugfix here (my patch) and
> then a cleanup patch that you could make incrementally on mine. I don't
> personally like the name "rest_nodes_parsed" since it's poor English, I
> suggest renaming nodes_parsed to mem_nodes_parsed as I originally asked
> and then cpu_nodes_parsed to acpi_nodes_parsed or something similiar.
IMHO, name acpi_nodes_parsed is not appropriate for this intention as nodes_parsed comes from acpi too.
Think about it again, it's better _NOT_ to mix up cpu_nodes_parsed and hotplugpable_nodes together.
We cannot assume cpu_nodes_parsed has no other use in future, like possibly cpu hotplug emulation. I
think that a clean and straightforward way is to keep nodes with hotpluggable range in a separated
nodemask, like "hp_nodes_parsed", which could also be used for future mem hotplug emulation. Then
node data corresponding to nodes_parsed is kept in nodes[], node data for hp_nodes_parsed is kept in
nodes_add[].
> Ingo, the following is my bugfix patch that addresses the issue at
> http://patchwork.kernel.org/patch/69499.
Personally I don't like such patch with confusable info.
I think following patch would be more straightfoward and clean:
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index a271241..c5552ae 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -27,8 +27,18 @@ int acpi_numa __initdata;
static struct acpi_table_slit *acpi_slit;
+/* nodes_parsed:
+ * - nodes with memory on
+ * cpu_nodes_parsed:
+ * - nodes with cpu on
+ * hp_nodes_parsed:
+ * - nodes with hotpluggable memory region
+ *
+ * We union these tree nodemasks to get node_possible_map.
+ */
static nodemask_t nodes_parsed __initdata;
static nodemask_t cpu_nodes_parsed __initdata;
+static nodemask_t hp_nodes_parsed __initdata;
static struct bootnode nodes[MAX_NUMNODES] __initdata;
static struct bootnode nodes_add[MAX_NUMNODES];
@@ -229,9 +239,11 @@ update_nodes_add(int node, unsigned long start, unsigned long end)
printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n");
}
- if (changed)
+ if (changed) {
+ node_set(node, hp_nodes_parsed);
printk(KERN_INFO "SRAT: hot plug zone found %Lx - %Lx\n",
nd->start, nd->end);
+ }
}
/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
@@ -380,8 +392,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
return -1;
}
- /* Account for nodes with cpus and no memory */
+ /* Account for nodes with memory and cpus */
nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed);
+ /* Account for nodes with hotpluggable memory regions */
+ nodes_or(node_possible_map, node_possible_map, hp_nodes_parsed);
/* Finally register nodes */
for_each_node_mask(i, node_possible_map)
next prev parent reply other threads:[~2010-01-21 2:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 7:42 [PATCH] x86/mm/srat_64.c: nodes_parsed should include all nodes detected by ACPI Haicheng Li
2010-01-17 2:22 ` Haicheng Li
2010-01-17 21:53 ` David Rientjes
2010-01-18 6:30 ` Yinghai Lu
2010-01-18 10:43 ` David Rientjes
2010-01-19 11:08 ` Haicheng Li
2010-01-19 11:29 ` Haicheng Li
2010-01-19 23:30 ` David Rientjes
2010-01-20 16:40 ` Haicheng Li
2010-01-20 20:10 ` [patch] x86: set hotpluggable nodes in nodes_possible_map David Rientjes
2010-01-20 22:45 ` Yinghai Lu
2010-01-20 23:32 ` David Rientjes
2010-01-21 3:00 ` Haicheng Li
2010-01-21 2:58 ` Haicheng Li [this message]
2010-01-21 6:58 ` David Rientjes
2010-01-21 7:31 ` Haicheng Li
2010-01-21 7:50 ` David Rientjes
2010-01-21 8:33 ` Haicheng Li
2010-01-21 23:12 ` David Rientjes
2010-01-22 4:06 ` [PATCH] x86/mm/srat_64.c: make node_possible_map include hotpluggable node Haicheng Li
2010-01-22 7:33 ` H. Peter Anvin
2010-01-22 8:43 ` Haicheng Li
2010-01-22 10:14 ` H. Peter Anvin
2010-01-22 10:35 ` Haicheng Li
2010-01-22 11:15 ` [tip:x86/urgent] x86: Set hotpluggable nodes in nodes_possible_map tip-bot for David Rientjes
2010-01-23 6:51 ` tip-bot for David Rientjes
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=4B57C2DD.3050402@linux.intel.com \
--to=haicheng.li@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.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.