mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch v2] x86 : set numa_nodes_parsed at acpi_numa_memory_affinity_init
@ 2012-06-04  2:42 Yasuaki Ishimatsu
  2012-06-06 15:17 ` [tip:x86/urgent] x86/numa: Set numa_nodes_parsed at acpi_numa_memory_affinity_init() tip-bot for Yasuaki Ishimatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Yasuaki Ishimatsu @ 2012-06-04  2:42 UTC (permalink / raw)
  To: hpa, mingo, tglx, liuj97, kosaki.motohiro, rientjes, x86, linux-kernel

When hot-adding a CPU, the system outputs following messages since
node_to_cpumask_map[2] was not allocated memory.

Booting Node 2 Processor 32 APIC 0xc0
node_to_cpumask_map[2] NULL
Pid: 0, comm: swapper/32 Tainted: G       A     3.3.5-acd #21
Call Trace:
 [<ffffffff81048845>] debug_cpumask_set_cpu+0x155/0x160
 [<ffffffff8105e28a>] ? add_timer_on+0xaa/0x120
 [<ffffffff8150665f>] numa_add_cpu+0x1e/0x22
 [<ffffffff815020bb>] identify_cpu+0x1df/0x1e4
 [<ffffffff815020d6>] identify_econdary_cpu+0x16/0x1d
 [<ffffffff81504614>] smp_store_cpu_info+0x3c/0x3e
 [<ffffffff81505263>] smp_callin+0x139/0x1be
 [<ffffffff815052fb>] start_secondary+0x13/0xeb

The reason is that the bit of node 2 was not set at numa_nodes_parsed.
numa_nodes_parsed is set by only acpi_numa_processor_affinity_init /
acpi_numa_x2apic_affinity_init. Thus even if hot-added memory which is
same PXM as hot-added CPU is written in ACPI SRAT Table, if the
hot-added CPU is not written in ACPI SRAT table, numa_nodes_parsed is
not set.

But according to ACPI Spec Rev 5.0, it says about ACPI SRAT table as follows:
This optional table provides information that allows OSPM to associate
processors and memory ranges, including ranges of memory provided by
hot-added memory devices, with system localities / proximity domains
and clock domains.

It means that ACPI SRAT table only provides information for CPUs present
at boot time and for memory including hot-added memory. So hot-added memory
is written in ACPI SRAT table, but hot-added CPU is not written in it.
Thus numa_nodes_parsed should be set by not only
acpi_numa_processor_affinity_init / acpi_numa_x2apic_affinity_init
but also acpi_numa_memory_affinity_init for the case.

Additionally, if system has cpuless memory node,
acpi_numa_processor_affinity_init / acpi_numa_x2apic_affinity_init cannot
set numa_nodes_parseds since these functions cannot find cpu description
for the node. In this case, numa_nodes_parsed needs to be set by
acpi_numa_memory_affinity_init.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

---
 arch/x86/mm/srat.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-3.4/arch/x86/mm/srat.c
===================================================================
--- linux-3.4.orig/arch/x86/mm/srat.c	2012-05-21 07:29:13.000000000 +0900
+++ linux-3.4/arch/x86/mm/srat.c	2012-05-29 05:28:27.353916902 +0900
@@ -176,6 +176,8 @@
 		return;
 	}

+	node_set(node, numa_nodes_parsed);
+
 	printk(KERN_INFO "SRAT: Node %u PXM %u %Lx-%Lx\n", node, pxm,
 	       start, end);
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86/numa: Set numa_nodes_parsed at acpi_numa_memory_affinity_init()
  2012-06-04  2:42 [Patch v2] x86 : set numa_nodes_parsed at acpi_numa_memory_affinity_init Yasuaki Ishimatsu
@ 2012-06-06 15:17 ` tip-bot for Yasuaki Ishimatsu
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Yasuaki Ishimatsu @ 2012-06-06 15:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, isimatu.yasuaki, tglx, kosaki.motohiro,
	rientjes

Commit-ID:  4af463d28f1a026e25c0b879fac2a0d2b7bff599
Gitweb:     http://git.kernel.org/tip/4af463d28f1a026e25c0b879fac2a0d2b7bff599
Author:     Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
AuthorDate: Mon, 4 Jun 2012 11:42:32 +0900
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 6 Jun 2012 11:58:39 +0200

x86/numa: Set numa_nodes_parsed at acpi_numa_memory_affinity_init()

When hot-adding a CPU, the system outputs following messages
since node_to_cpumask_map[2] was not allocated memory.

Booting Node 2 Processor 32 APIC 0xc0
node_to_cpumask_map[2] NULL
Pid: 0, comm: swapper/32 Tainted: G       A     3.3.5-acd #21
Call Trace:
 [<ffffffff81048845>] debug_cpumask_set_cpu+0x155/0x160
 [<ffffffff8105e28a>] ? add_timer_on+0xaa/0x120
 [<ffffffff8150665f>] numa_add_cpu+0x1e/0x22
 [<ffffffff815020bb>] identify_cpu+0x1df/0x1e4
 [<ffffffff815020d6>] identify_econdary_cpu+0x16/0x1d
 [<ffffffff81504614>] smp_store_cpu_info+0x3c/0x3e
 [<ffffffff81505263>] smp_callin+0x139/0x1be
 [<ffffffff815052fb>] start_secondary+0x13/0xeb

The reason is that the bit of node 2 was not set at
numa_nodes_parsed. numa_nodes_parsed is set by only
acpi_numa_processor_affinity_init /
acpi_numa_x2apic_affinity_init. Thus even if hot-added memory
which is same PXM as hot-added CPU is written in ACPI SRAT
Table, if the hot-added CPU is not written in ACPI SRAT table,
numa_nodes_parsed is not set.

But according to ACPI Spec Rev 5.0, it says about ACPI SRAT
table as follows: This optional table provides information that
allows OSPM to associate processors and memory ranges, including
ranges of memory provided by hot-added memory devices, with
system localities / proximity domains and clock domains.

It means that ACPI SRAT table only provides information for CPUs
present at boot time and for memory including hot-added memory.
So hot-added memory is written in ACPI SRAT table, but hot-added
CPU is not written in it. Thus numa_nodes_parsed should be set
by not only acpi_numa_processor_affinity_init /
acpi_numa_x2apic_affinity_init but also
acpi_numa_memory_affinity_init for the case.

Additionally, if system has cpuless memory node,
acpi_numa_processor_affinity_init /
acpi_numa_x2apic_affinity_init cannot set numa_nodes_parseds
since these functions cannot find cpu description for the node.
In this case, numa_nodes_parsed needs to be set by
acpi_numa_memory_affinity_init.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: liuj97@gmail.com
Cc: kosaki.motohiro@gmail.com
Link: http://lkml.kernel.org/r/4FCC2098.4030007@jp.fujitsu.com
[ merged it ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/mm/srat.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index 732af3a..4599c3e 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -176,6 +176,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
 		return;
 	}
 
+	node_set(node, numa_nodes_parsed);
+
 	printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n",
 	       node, pxm,
 	       (unsigned long long) start, (unsigned long long) end - 1);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-06 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04  2:42 [Patch v2] x86 : set numa_nodes_parsed at acpi_numa_memory_affinity_init Yasuaki Ishimatsu
2012-06-06 15:17 ` [tip:x86/urgent] x86/numa: Set numa_nodes_parsed at acpi_numa_memory_affinity_init() tip-bot for Yasuaki Ishimatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome