* [PATCH sched_ext/for-6.14] sched_ext: idle: use assign_cpu() to update the idle cpumask
@ 2024-12-28 10:02 Andrea Righi
2024-12-29 22:43 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Righi @ 2024-12-28 10:02 UTC (permalink / raw)
To: Tejun Heo, David Vernet, Changwoo Min; +Cc: Yury Norov, linux-kernel
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>
---
kernel/sched/ext.c | 5 +----
1 file changed, 1 insertion(+), 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()) {
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH sched_ext/for-6.14] sched_ext: idle: use assign_cpu() to update the idle cpumask
2024-12-28 10:02 [PATCH sched_ext/for-6.14] sched_ext: idle: use assign_cpu() to update the idle cpumask Andrea Righi
@ 2024-12-29 22:43 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2024-12-29 22:43 UTC (permalink / raw)
To: Andrea Righi; +Cc: David Vernet, Changwoo Min, Yury Norov, linux-kernel
On Sat, Dec 28, 2024 at 11:02:50AM +0100, Andrea Righi wrote:
> 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>
Applied to sched_ext/for-6.14.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-29 22:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-28 10:02 [PATCH sched_ext/for-6.14] sched_ext: idle: use assign_cpu() to update the idle cpumask Andrea Righi
2024-12-29 22:43 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox