[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191216153809.105463-3-Jonathan.Cameron@huawei.com>
Date: Mon, 16 Dec 2019 23:38:04 +0800
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: <linux-mm@...ck.org>, <linux-acpi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <x86@...nel.org>
CC: Keith Busch <keith.busch@...el.com>, <jglisse@...hat.com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>, <linuxarm@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Tao Xu <tao3.xu@...el.com>,
Brice Goglin <brice.goglin@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Hanjun Guo <guohanjun@...wei.com>,
Sudeep Holla <sudeep.holla@....com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH V6 2/7] arm64: Support Generic Initiator only domains
The one thing that currently needs doing from an architecture
point of view is associating the GI domain with its nearest
memory domain. This allows all the standard NUMA aware code
to get a 'reasonable' answer.
A clever driver might elect to do load balancing etc
if there are multiple host / memory domains nearby, but
that's a decision for the driver.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
---
arch/arm64/kernel/smp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index d4ed9a19d8fe..eb5ef84fe7b9 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -716,6 +716,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
{
int err;
unsigned int cpu;
+ unsigned int node;
unsigned int this_cpu;
init_cpu_topology();
@@ -754,6 +755,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
set_cpu_present(cpu, true);
numa_store_cpu_info(cpu);
}
+
+ /*
+ * Walk the numa domains and set the node to numa memory reference
+ * for any that are Generic Initiator Only.
+ */
+ for_each_node_state(node, N_GENERIC_INITIATOR)
+ set_gi_numa_mem(node, local_memory_node(node));
}
void (*__smp_cross_call)(const struct cpumask *, unsigned int);
--
2.19.1
Powered by blists - more mailing lists