Thread (17 messages) flat view 17 messages, 4 authors, 2021-04-21

RE: [RFC PATCH v5 4/4] scheduler: Add cluster scheduler level for x86

From: Song Bao Hua (Barry Song) <hidden>
Date: 2021-03-23 23:21:55
Also in: linux-acpi, lkml

-----Original Message-----
From: Tim Chen [mailto:tim.c.chen@linux.intel.com]
Sent: Wednesday, March 24, 2021 11:51 AM
To: Song Bao Hua (Barry Song) <redacted>;
catalin.marinas@arm.com; will@kernel.org; rjw@rjwysocki.net;
vincent.guittot@linaro.org; bp@alien8.de; tglx@linutronix.de;
mingo@redhat.com; lenb@kernel.org; peterz@infradead.org;
dietmar.eggemann@arm.com; rostedt@goodmis.org; bsegall@google.com;
mgorman@suse.de
Cc: msys.mizuma@gmail.com; valentin.schneider@arm.com;
gregkh@linuxfoundation.org; Jonathan Cameron [off-list ref];
juri.lelli@redhat.com; mark.rutland@arm.com; sudeep.holla@arm.com;
aubrey.li@linux.intel.com; linux-arm-kernel@lists.infradead.org;
linux-kernel@vger.kernel.org; linux-acpi@vger.kernel.org; x86@kernel.org;
xuwei (O) [off-list ref]; Zengtao (B) [off-list ref];
guodong.xu@linaro.org; yangyicong [off-list ref]; Liguozhu (Kenneth)
[off-list ref]; linuxarm@openeuler.org; hpa@zytor.com
Subject: Re: [RFC PATCH v5 4/4] scheduler: Add cluster scheduler level for x86



On 3/18/21 9:16 PM, Barry Song wrote:
quoted
From: Tim Chen <redacted>

There are x86 CPU architectures (e.g. Jacobsville) where L2 cahce
is shared among a cluster of cores instead of being exclusive
to one single core.

To prevent oversubscription of L2 cache, load should be
balanced between such L2 clusters, especially for tasks with
no shared data.

Also with cluster scheduling policy where tasks are woken up
in the same L2 cluster, we will benefit from keeping tasks
related to each other and likely sharing data in the same L2
cluster.

Add CPU masks of CPUs sharing the L2 cache so we can build such
L2 cluster scheduler domain.

Signed-off-by: Tim Chen <redacted>
Signed-off-by: Barry Song <redacted>

Barry,

Can you also add this chunk to the patch.
Thanks.
Sure, Tim, Thanks. I'll put that into patch 4/4 in v6.
quoted hunk ↗ jump to hunk
Tim

diff --git a/arch/x86/include/asm/topology.h
b/arch/x86/include/asm/topology.h
index 2a11ccc14fb1..800fa48c9fcd 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -115,6 +115,7 @@ extern unsigned int __max_die_per_package;

 #ifdef CONFIG_SMP
 #define topology_die_cpumask(cpu)		(per_cpu(cpu_die_map, cpu))
+#define topology_cluster_cpumask(cpu)		(cpu_clustergroup_mask(cpu))
 #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
 #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
Thanks
Barry


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help