]> git.ipfire.org Git - thirdparty/linux.git/commit
sched_ext: idle: Prioritize idle SMT sibling
authorAndrea Righi <arighi@nvidia.com>
Fri, 20 Mar 2026 17:28:31 +0000 (18:28 +0100)
committerTejun Heo <tj@kernel.org>
Sat, 21 Mar 2026 18:31:16 +0000 (08:31 -1000)
commit2197cecdb02c57b08340059452540fcf101fa30d
tree31201f4f244cc5ade37b682691d484710e1269e4
parentf6689792ffc4bc226636a513f8b0ac7bd45c5091
sched_ext: idle: Prioritize idle SMT sibling

In the default built-in idle CPU selection policy, when @prev_cpu is
busy and no fully idle core is available, try to place the task on its
SMT sibling if that sibling is idle, before searching any other idle CPU
in the same LLC.

Migration to the sibling is cheap and keeps the task on the same core,
preserving L1 cache and reducing wakeup latency.

On large SMT systems this appears to consistently boost throughput by
roughly 2-3% on CPU-bound workloads (running a number of tasks equal to
the number of SMT cores).

Cc: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext_idle.c