linux/kernel/sched
Andrea Righi 648d44bda7 sched/topology: Add asymmetric SMT packing override
Architectures can use SD_ASYM_PACKING to describe preferred CPU ordering
at the SMT scheduling domain. Some systems benefit from this policy, but
their firmware cannot describe the preference and inferring it from the
CPU model would embed a platform-specific policy in the kernel.

Add sched_smt_asym_packing=on boot option to force SD_ASYM_PACKING at
the SMT level. Omitting the option preserves the topology provided by
the architecture or firmware.

Apply the override centrally to domains with SD_SHARE_CPUCAPACITY so it
also covers architectures with custom SMT topology callbacks, including
powerpc.

When enabled, priority remains defined by arch_asym_cpu_priority(). The
weak default prefers lower-numbered logical CPUs, while architecture
overrides remain authoritative. Siblings with equal priorities remain
unordered. In particular, x86 with CONFIG_SCHED_MC_PRIO normally gives
both SMT siblings the same core priority, so enabling the option there
does not prioritize a sibling.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260929165538.726616-3-arighi@nvidia.com
2026-10-01 14:00:35 +02:00
..
ext sched: Add sched_ext hooks for proxy execution 2026-09-28 08:44:39 +02:00
autogroup.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
autogroup.h
build_policy.c sched_ext: Move scx_dispatch_sched() to a new inlines.h 2026-07-15 13:37:59 -10:00
build_utility.c
clock.c sched/clock: Avoid false sharing for sched_clock_irqtime 2026-02-03 12:04:19 +01:00
completion.c
core_sched.c sched: Unify SMT active check via sched_smt_active() 2026-05-19 12:17:37 +02:00
core.c sched: Set TIF_NEED_RESCHED before calling __trace_set_need_resched() 2026-10-01 14:00:34 +02:00
cpuacct.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpudeadline.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpudeadline.h sched/deadline: only set free_cpus for online runqueues 2025-10-16 11:13:49 +02:00
cpufreq_schedutil.c cpufreq: schedutil: Fix rate limit overflow 2026-08-15 19:00:11 +02:00
cpufreq.c
cpupri.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpupri.h
cputime.c sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
deadline.c sched: Restart fair hrtick after same-task repicks 2026-09-25 12:45:57 +02:00
debug.c sched/debug: Add migration stats due to non preferred CPUs 2026-09-28 08:44:42 +02:00
fair.c sched/fair: Honor asymmetric SMT priority in idle selection 2026-10-01 14:00:35 +02:00
features.h sched/rt: Have RT_PUSH_IPI be default off for non PREEMPT_RT 2026-05-19 12:17:39 +02:00
idle.c sched: Restart fair hrtick after same-task repicks 2026-09-25 12:45:57 +02:00
isolation.c sched/isolation: Defer freeing of cpumask memblock memory to initcall 2026-08-13 12:37:03 +02:00
loadavg.c Merge branch 'tip/sched/urgent' 2025-07-14 17:16:28 +02:00
Makefile sched: Enable context analysis for core.c and fair.c 2026-01-05 16:43:36 +01:00
membarrier.c Locking updates for v7.2: 2026-06-15 14:21:14 +05:30
pelt.c sched/eevdf: Move to a single runqueue 2026-06-30 10:56:53 +02:00
pelt.h sched/fair: Switch to task based throttle model 2025-09-03 10:03:14 +02:00
psi.c Merge branch 'sched/urgent' 2026-08-14 16:12:58 +02:00
rq-offsets.c sched: Make migrate_{en,dis}able() inline 2025-09-25 09:57:16 +02:00
rt.c sched: Restart fair hrtick after same-task repicks 2026-09-25 12:45:57 +02:00
sched-pelt.h
sched.h sched/core: Push current task from non preferred CPU 2026-09-28 08:44:42 +02:00
smp.h
stats.c
stats.h sched/fair: Co-locate cfs_rq and sched_entity in cfs_tg_state 2026-06-02 12:26:10 +02:00
stop_task.c sched: Restart fair hrtick after same-task repicks 2026-09-25 12:45:57 +02:00
swait.c
syscalls.c Linux 7.0-rc4 2026-03-17 07:14:42 +01:00
topology.c sched/topology: Add asymmetric SMT packing override 2026-10-01 14:00:35 +02:00
wait_bit.c futex: Fix might_sleep() warning in futex_pivot_pending() 2026-08-20 18:26:42 +02:00
wait.c sched/wait: Clarify WF_SYNC wakeup semantics 2026-09-25 20:32:31 +02:00