Skip to content

Commit ed4ad1c

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/topology: Restore SD_PREFER_SIBLING on MC domains
The normal x86_topology on NHM+ machines degenerates because the MC and CPU domains are of the same size, therefore MC inherits SD_PREFER_SIBLING from CPU (which then gets taken out). The result is that we'll spread tasks across the first NUMA level in order to maximize cache utilization. However, for the x86_numa_in_package_topology we loose the CPU domain, and we'll not have SD_PREFER_SIBLING set anywhere, giving a distinct difference in behaviour. Commit: 8e7fbcb ("sched: Remove stale power aware scheduling remnants and dysfunctional knobs") made a fail by not preserving the SD_PREFER_SIBLING for the !power_saving case on both CPU and MC. Then commit: 6956dc5 ("sched/numa: Add SD_PERFER_SIBLING to CPU domain") adds it back to the CPU but not MC. Restore that now, such that we get consistent spreading behaviour wrt L3 and NUMA. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 799ba82 commit ed4ad1c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/sched/topology.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ sd_init(struct sched_domain_topology_level *tl,
11571157
sd->smt_gain = 1178; /* ~15% */
11581158

11591159
} else if (sd->flags & SD_SHARE_PKG_RESOURCES) {
1160+
sd->flags |= SD_PREFER_SIBLING;
11601161
sd->imbalance_pct = 117;
11611162
sd->cache_nice_tries = 1;
11621163
sd->busy_idx = 2;

0 commit comments

Comments
 (0)