Skip to content

Commit e67ecf6

Browse files
sudeep-hollawildea01
authored andcommitted
arm64: topology: re-introduce numa mask check for scheduler MC selection
Commit 37c3ec2 ("arm64: topology: divorce MC scheduling domain from core_siblings") selected the smallest of LLC, socket siblings, and NUMA node siblings to ensure that the sched domain we build for the MC layer isn't larger than the DIE above it or it's shrunk to the socket or NUMA node if LLC exist acrosis NUMA node/chiplets. Commit acd32e52e4e0 ("arm64: topology: Avoid checking numa mask for scheduler MC selection") reverted the NUMA siblings checks since the CPU topology masks weren't updated on hotplug at that time. This patch re-introduces numa mask check as the CPU and NUMA topology is now updated in hotplug paths. Effectively, this patch does the partial revert of commit acd32e52e4e0. Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Tested-by: Ganapatrao Kulkarni <[email protected]> Tested-by: Hanjun Guo <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent f70ff12 commit e67ecf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/arm64/kernel/topology.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,13 @@ EXPORT_SYMBOL_GPL(cpu_topology);
215215

216216
const struct cpumask *cpu_coregroup_mask(int cpu)
217217
{
218-
const cpumask_t *core_mask = &cpu_topology[cpu].core_sibling;
218+
const cpumask_t *core_mask = cpumask_of_node(cpu_to_node(cpu));
219219

220+
/* Find the smaller of NUMA, core or LLC siblings */
221+
if (cpumask_subset(&cpu_topology[cpu].core_sibling, core_mask)) {
222+
/* not numa in package, lets use the package siblings */
223+
core_mask = &cpu_topology[cpu].core_sibling;
224+
}
220225
if (cpu_topology[cpu].llc_id != -1) {
221226
if (cpumask_subset(&cpu_topology[cpu].llc_sibling, core_mask))
222227
core_mask = &cpu_topology[cpu].llc_sibling;

0 commit comments

Comments
 (0)