Skip to content

Commit 108af4b

Browse files
ricardonIngo Molnar
authored andcommitted
x86/sched: Restore the SD_ASYM_PACKING flag in the DIE domain
Commit 8f2d6c4 ("x86/sched: Rewrite topology setup") dropped the SD_ASYM_PACKING flag in the DIE domain added in commit 044f0e2 ("x86/sched: Add the SD_ASYM_PACKING flag to the die domain of hybrid processors"). Restore it on hybrid processors. The die-level domain does not depend on any build configuration and now x86_sched_itmt_flags() is always needed. Remove the build dependency on CONFIG_SCHED_[SMT|CLUSTER|MC]. Fixes: 8f2d6c4 ("x86/sched: Rewrite topology setup") Signed-off-by: Ricardo Neri <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Chen Yu <[email protected]> Tested-by: Caleb Callaway <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 450e749 commit 108af4b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
579579
}
580580

581581

582-
#if defined(CONFIG_SCHED_SMT) || defined(CONFIG_SCHED_CLUSTER) || defined(CONFIG_SCHED_MC)
583582
static inline int x86_sched_itmt_flags(void)
584583
{
585584
return sysctl_sched_itmt_enabled ? SD_ASYM_PACKING : 0;
@@ -603,7 +602,14 @@ static int x86_cluster_flags(void)
603602
return cpu_cluster_flags() | x86_sched_itmt_flags();
604603
}
605604
#endif
606-
#endif
605+
606+
static int x86_die_flags(void)
607+
{
608+
if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
609+
return x86_sched_itmt_flags();
610+
611+
return 0;
612+
}
607613

608614
/*
609615
* Set if a package/die has multiple NUMA nodes inside.
@@ -640,7 +646,7 @@ static void __init build_sched_topology(void)
640646
*/
641647
if (!x86_has_numa_in_package) {
642648
x86_topology[i++] = (struct sched_domain_topology_level){
643-
cpu_cpu_mask, SD_INIT_NAME(DIE)
649+
cpu_cpu_mask, x86_die_flags, SD_INIT_NAME(DIE)
644650
};
645651
}
646652

0 commit comments

Comments
 (0)