diff options
| author | Andrea Righi <arighi@nvidia.com> | 2024-12-28 13:02:50 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2024-12-30 01:43:07 +0300 |
| commit | 9cf9aceed21e3f08c94108bd688e812effce4423 (patch) | |
| tree | 6356b80d6bbaec38ec34ad6c79e1238cf5a2a300 | |
| parent | bc3a116a44988103187b192414caddbcb598072d (diff) | |
| download | linux-9cf9aceed21e3f08c94108bd688e812effce4423.tar.xz | |
sched_ext: idle: use assign_cpu() to update the idle cpumask
Use the assign_cpu() helper to set or clear the CPU in the idle mask,
based on the idle condition.
Acked-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | kernel/sched/ext.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 7b229a4fb083..eec4716de225 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3654,10 +3654,7 @@ void __scx_update_idle(struct rq *rq, bool idle) return; } - if (idle) - cpumask_set_cpu(cpu, idle_masks.cpu); - else - cpumask_clear_cpu(cpu, idle_masks.cpu); + assign_cpu(cpu, idle_masks.cpu, idle); #ifdef CONFIG_SCHED_SMT if (sched_smt_active()) { |
