Re: [PATCH 2/3] softirq: avoid spurious stalls due to need_resched()

From: Paul E. McKenney
Date: Sat Mar 04 2023 - 15:48:51 EST


On Fri, Mar 03, 2023 at 07:11:09PM -0800, Paul E. McKenney wrote:
> On Fri, Mar 03, 2023 at 05:39:21PM -0800, Jakub Kicinski wrote:
> > On Fri, 3 Mar 2023 17:25:35 -0800 Paul E. McKenney wrote:
> > > > Just to be sure - have you seen Peter's patches?
> > > >
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git core/softirq
> > > >
> > > > I think it feeds the time limit to the callback from softirq,
> > > > so the local 3ms is no more?
> > >
> > > I might or might not have back in September of 2020. ;-)
> > >
> > > But either way, the question remains: Should RCU_SOFTIRQ do time checking
> > > in ksoftirqd context? Seems like the answer should be "yes", independently
> > > of Peter's patches.
> >
> > :-o I didn't notice, I thought that's from Dec 22, LWN was writing
> > about Peter's rework at that point. I'm not sure what the story is :(
> > And when / if any of these changes are coming downstream.
>
> Not a problem either way, as the compiler would complain bitterly about
> the resulting merge conflict and it is easy to fix. ;-)

And even more not a problem because in_serving_softirq() covers both the
softirq environment as well as ksoftirqd. So that "else" clause is for
rcuoc kthreads, which do not block other softirq vectors. So I am adding
a comment instead...

Thanx, Paul