]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work
authorZqiang <qiang.zhang@linux.dev>
Mon, 17 Nov 2025 12:53:10 +0000 (20:53 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 17 Nov 2025 15:07:22 +0000 (05:07 -1000)
For PREEMPT_RT kernels, the kick_cpus_irq_workfn() be invoked in
the per-cpu irq_work/* task context and there is no rcu-read critical
section to protect. this commit therefore use IRQ_WORK_INIT_HARD() to
initialize the per-cpu rq->scx.kick_cpus_irq_work in the
init_sched_ext_class().

Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c

index 07399210ac2d9a38dfb60caabded0fbe12cb78eb..7aae1d0ce37e6473f64fc78db6311213249278f6 100644 (file)
@@ -5322,7 +5322,7 @@ void __init init_sched_ext_class(void)
                BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_preempt, GFP_KERNEL, n));
                BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_wait, GFP_KERNEL, n));
                rq->scx.deferred_irq_work = IRQ_WORK_INIT_HARD(deferred_irq_workfn);
-               init_irq_work(&rq->scx.kick_cpus_irq_work, kick_cpus_irq_workfn);
+               rq->scx.kick_cpus_irq_work = IRQ_WORK_INIT_HARD(kick_cpus_irq_workfn);
 
                if (cpu_online(cpu))
                        cpu_rq(cpu)->scx.flags |= SCX_RQ_ONLINE;