]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: idle: small CPU iteration refactoring
authorAndrea Righi <arighi@nvidia.com>
Sat, 4 Jan 2025 09:00:09 +0000 (10:00 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 6 Jan 2025 18:48:38 +0000 (08:48 -1000)
commitd9071ecb313940fe1d8827fef48bbf9fdaf28a4c
tree7f36ed983fe31c70978b80a7c988d00572664bde
parentc0cf3530098bc13578bd4d0692351a2c4a57425d
sched_ext: idle: small CPU iteration refactoring

Replace the loop to check if all SMT CPUs are idle with
cpumask_subset(). This simplifies the code and slightly improves
efficiency, while preserving the original behavior.

Note that idle_masks.smt handling remains racy, which is acceptable as
it serves as an optimization and is self-correcting.

Suggested-and-reviewed-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c