All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qais Yousef <qais.yousef@arm.com>
To: John Stultz <jstultz@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Connor O'Brien <connoro@google.com>,
	John Dias <joaodias@google.com>, Rick Yiu <rickyiu@google.com>,
	John Kacur <jkacur@redhat.com>,
	Chris Redpath <chris.redpath@arm.com>,
	Abhijeet Dharmapurikar <adharmap@quicinc.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	kernel-team@android.com, "J . Avila" <elavila@google.com>
Subject: Re: [RFC PATCH v3 2/3] sched: Avoid placing RT threads on cores handling long softirqs
Date: Wed, 5 Oct 2022 16:31:25 +0100	[thread overview]
Message-ID: <20221005153125.3apfpzhqs3mx6deg@wubuntu> (raw)
In-Reply-To: <CANDhNCpLp+St4U_fjs+W8HXT-2ff4gpkx0P6vDnrX0CcesiQfA@mail.gmail.com>

On 10/03/22 09:55, John Stultz wrote:

[...]

> > >               int target = find_lowest_rq(p);
> > > @@ -1656,11 +1699,14 @@ select_task_rq_rt(struct task_struct *p, int cpu, int flags)
> > >                       goto out_unlock;
> > >
> > >               /*
> > > -              * Don't bother moving it if the destination CPU is
> > > +              * If cpu is non-preemptible, prefer remote cpu
> > > +              * even if it's running a higher-prio task.
> > > +              * Otherwise: Don't bother moving it if the destination CPU is
> > >                * not running a lower priority task.
> > >                */
> > >               if (target != -1 &&
> > > -                 p->prio < cpu_rq(target)->rt.highest_prio.curr)
> > > +                 (may_not_preempt ||
> > > +                  p->prio < cpu_rq(target)->rt.highest_prio.curr))
> > >                       cpu = target;
> >
> > I'm not sure this makes sense. You assume a higher priority task will cause
> > less delay than softirqs. Which I think is an optimistic assumption?
> >
> > I think we should just mimic the same fallback behavior when we fail to find
> > a CPU that fits the capacity requirement. Keeps things more consistent IMO.
> 
> This sounds reasonable.  I do fret that long-running rt tasks are less
> common then the long running softirqs, so this may have an impact to
> the effectiveness of the patch, but I also suspect it's even more rare
> to have all the other cpus busy with rt tasks, so its probably very
> unlikely.

Yes. I think it is a hard problem to hit as all these other RT tasks must be
higher priority. So if this ever happens, then one should question if the
priority is set correctly for the audio threads first. Or why there are so many
higher priority tasks running for so long.


Thanks!

--
Qais Yousef

  parent reply	other threads:[~2022-10-05 15:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  1:25 [RFC][PATCH v3 0/3] Softirq -rt Optimizations John Stultz
2022-09-21  1:25 ` [RFC PATCH v3 1/3] softirq: Add generic accessor to percpu softirq_pending data John Stultz
2022-09-29 10:05   ` Heiko Carstens
2022-09-21  1:25 ` [RFC PATCH v3 2/3] sched: Avoid placing RT threads on cores handling long softirqs John Stultz
2022-09-28 12:55   ` Qais Yousef
2022-10-03 16:55     ` John Stultz
2022-10-03 17:47       ` John Stultz
2022-10-04  9:50       ` David Laight
2022-10-05 15:46         ` Qais Yousef
2022-10-05 15:31       ` Qais Yousef [this message]
2022-09-21  1:25 ` [RFC PATCH v3 3/3] softirq: defer softirq processing to ksoftirqd if CPU is busy with RT John Stultz
2022-09-28 12:56   ` Qais Yousef
2022-10-03 18:43     ` John Stultz
2022-09-28 13:00 ` [RFC][PATCH v3 0/3] Softirq -rt Optimizations Qais Yousef
2022-09-28 13:51   ` David Laight
2022-09-28 15:56     ` Qais Yousef
2022-09-28 16:19       ` David Laight
2022-09-29 10:47         ` Qais Yousef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221005153125.3apfpzhqs3mx6deg@wubuntu \
    --to=qais.yousef@arm.com \
    --cc=adharmap@quicinc.com \
    --cc=chris.redpath@arm.com \
    --cc=connoro@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=elavila@google.com \
    --cc=jkacur@redhat.com \
    --cc=joaodias@google.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rickyiu@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.