Re: [PATCH] rcu: Use IRQ_WORK_INIT_HARD for srcu's irq_work

Steven Rostedt <[email protected]>
Newsgroups org.kernel.vger.rcu,dev.linux.lists.linux-rt-devel
Message-ID <20260821124412.3b2e49c2@fedora>
On Fri, 21 Aug 2026 13:01:08 +0200
Sebastian Andrzej Siewior <[email protected]> wrote:

> > > > > > +	ssp->srcu_sup->irq_work = IRQ_WORK_INIT_HARD(srcu_irq_work);    
> > > > > 
> > > > > It may need a comment to not lose that.    
> > > 
> > > I agree a comment would be useful here.  
> > Urgh.  
> 
> What do you want me to cover in the comment? The arguing pro
> IRQ_WORK_INIT_HARD is because it is "just" a workqueue schedule and it
> avoids the jump over irq_work/ thread. This makes sense regardless of
> the tracing issue.
> If it would be not compatible with hard-irq context I would argue for
> the makefile change which is still sane since there is no other way to
> express dependencies (which we clearly have here).

Basically just a word to why it is HARD.

 	atomic_set(&ssp->srcu_sup->srcu_barrier_cpu_cnt, 0);
 	INIT_DELAYED_WORK(&ssp->srcu_sup->work, process_srcu);
-	init_irq_work(&ssp->srcu_sup->irq_work, srcu_irq_work);
+	/*
+	 * trace events started on the command line require SRCU before
+	 * the irq_work kthread starts. Since all it does is a simple
+	 * wakeup, having it as a hard irq, even on PREEMPT_RT is fine.
+	 */
+	ssp->srcu_sup->irq_work = IRQ_WORK_INIT_HARD(srcu_irq_work);
 	ssp->srcu_sup->sda_is_static = is_static;

-- Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.