[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCreB=Bm-X7WFp-oUtfR9uNRD=Vx8TehJ59HvF4Ke48ehQ@mail.gmail.com>
Date: Mon, 14 Nov 2022 23:08:36 -0800
From: John Stultz <jstultz@...gle.com>
To: Alexander Gordeev <agordeev@...ux.ibm.com>
Cc: Joel Fernandes <joel@...lfernandes.org>,
LKML <linux-kernel@...r.kernel.org>,
"Connor O'Brien" <connoro@...gle.com>,
John Dias <joaodias@...gle.com>, Rick Yiu <rickyiu@...gle.com>,
John Kacur <jkacur@...hat.com>,
Qais Yousef <qais.yousef@....com>,
Chris Redpath <chris.redpath@....com>,
Abhijeet Dharmapurikar <adharmap@...cinc.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>, kernel-team@...roid.com,
"J . Avila" <elavila@...gle.com>
Subject: Re: [PATCH RFC v4 2/3] sched: Avoid placing RT threads on cores
handling long softirqs
On Sun, Oct 23, 2022 at 12:45 AM Alexander Gordeev
<agordeev@...ux.ibm.com> wrote:
>
> On Sat, Oct 22, 2022 at 06:34:37PM +0000, Joel Fernandes wrote:
> > > In my reading of your approach if you find a way to additionally
> > > indicate long softirqs being handled by the remote ksoftirqd, it
> > > would cover all obvious/not-corner cases.
> >
> > How will that help? The long softirq executing inside ksoftirqd will disable
> > preemption and prevent any RT task from executing.
>
> Right. So the check to deem a remote CPU unfit would (logically) look like this:
>
> (active | pending | ksoftirqd) & LONG_SOFTIRQ_MASK
>
Alexander,
Apologies for the late response here, some other work took priority for a bit.
Thanks again for the feedback. But I wanted to follow up on your
suggestion here, as I'm not quite sure I see why we need the separate
ksoftirqd bitmask here?
As run_ksoftirqd() basically looks at the pending set and calls
__do_softirq() which then moves the bits from the pending mask to
active mask while they are being run.
So (pending|active)&LONG_SOFTIRQ_MASK seems like it should be a
sufficient check regardless of if the remote cpu is in softirq or
ksoftirqd, no?
thanks
-john
Powered by blists - more mailing lists