diff options
| author | Zqiang <qiang.zhang@linux.dev> | 2025-11-17 20:53:10 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-12 18:40:22 +0100 |
| commit | 9a92af96baf52640d60353ed948421950d23618a (patch) | |
| tree | 6c86c262a337a416fe82d9a0f394caafd7224905 | |
| parent | 3876ed8b1a81073cddb03733198ad57b6c2f1600 (diff) | |
| download | linux-9a92af96baf52640d60353ed948421950d23618a.tar.gz linux-9a92af96baf52640d60353ed948421950d23618a.tar.bz2 linux-9a92af96baf52640d60353ed948421950d23618a.zip | |
sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work
[ Upstream commit 36c6f3c03d104faf1aa90922f2310549c175420f ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | kernel/sched/ext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 16a7ae9b29ae..9592579db949 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5378,7 +5378,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; |
