Skip to content

Commit 9cf9ace

Browse files
arighihtejun
authored andcommitted
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>
1 parent bc3a116 commit 9cf9ace

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/sched/ext.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,10 +3654,7 @@ void __scx_update_idle(struct rq *rq, bool idle)
36543654
return;
36553655
}
36563656

3657-
if (idle)
3658-
cpumask_set_cpu(cpu, idle_masks.cpu);
3659-
else
3660-
cpumask_clear_cpu(cpu, idle_masks.cpu);
3657+
assign_cpu(cpu, idle_masks.cpu, idle);
36613658

36623659
#ifdef CONFIG_SCHED_SMT
36633660
if (sched_smt_active()) {

0 commit comments

Comments
 (0)