From: David Laight <David.Laight@ACULAB.COM>
To: 'Vincent Guittot' <vincent.guittot@linaro.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"bristot@redhat.com" <bristot@redhat.com>,
"vschneid@redhat.com" <vschneid@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"parth@linux.ibm.com" <parth@linux.ibm.com>
Cc: "qais.yousef@arm.com" <qais.yousef@arm.com>,
"chris.hyser@oracle.com" <chris.hyser@oracle.com>,
"valentin.schneider@arm.com" <valentin.schneider@arm.com>,
"patrick.bellasi@matbug.net" <patrick.bellasi@matbug.net>,
"pjt@google.com" <pjt@google.com>, "pavel@ucw.cz" <pavel@ucw.cz>,
"tj@kernel.org" <tj@kernel.org>,
"qperret@google.com" <qperret@google.com>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"joshdon@google.com" <joshdon@google.com>
Subject: RE: [PATCH v2 0/7] Add latency_nice priority
Date: Fri, 13 May 2022 07:12:58 +0000 [thread overview]
Message-ID: <86066641739c4897b0001153e598a261@AcuMS.aculab.com> (raw)
In-Reply-To: <20220512163534.2572-1-vincent.guittot@linaro.org>
From: Vincent Guittot
> Sent: 12 May 2022 17:35
>
> This patchset restarts the work about adding a latency nice priority to
> describe the latency tolerance of cfs tasks.
>
> The patches [1-4] have been done by Parth:
> https://lore.kernel.org/lkml/20200228090755.22829-1-parth@linux.ibm.com/
>
> I have just rebased and moved the set of latency priority outside the
> priority update. I have removed the reviewed tag because the patches
> are 2 years old.
>
> The patches [5-7] use latency nice priority to decide if a cfs task can
> preempt the current running task. Patch 5 gives some tests results with
> cyclictests and hackbench to highlight the benefit of latency nice
> priority for short interactive task or long intensive tasks.
I'd have thought the best way to reduce latency would be to look
harder for an idle cpu before trying to preempt the current task.
By far the worst case latency for a cfs task is waking it from an
rt task.
AFAICT the cpu selection algorithm is something like:
1) if the cpu it last ran on is idle, schedule it there.
2) if one of a small subset of cpu is idle run it there.
3) schedule on the current cpu after the rt thread exits.
Then there is the additional behaviour:
An rt thread (almost) always starts on the cpu it ran on last,
any running cfs thread is put on the q for that cpu.
This makes it very difficult to start a background cfs thread
from an active rt thread.
Quite often it won't migrate to an idle cpu until the timer
tick scheduler rebalance happens.
I think the search for an idle cpu is also limited when woken
by a cfs thread.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-05-13 7:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 16:35 Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 1/7] sched: Introduce latency-nice as a per-task attribute Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 2/7] sched/core: Propagate parent task's latency requirements to the child task Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 3/7] sched: Allow sched_{get,set}attr to change latency_nice of the task Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 4/7] sched/core: Add permission checks for setting the latency_nice value Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 5/7] sched/fair: Take into account latency nice at wakeup Vincent Guittot
2022-05-17 0:54 ` Josh Don
2022-05-19 13:55 ` Vincent Guittot
2022-05-19 20:06 ` Josh Don
2022-05-23 12:58 ` Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 6/7] sched/fair: Add sched group latency support Vincent Guittot
2022-05-12 16:35 ` [PATCH v2 7/7] sched/core: support latency nice with sched core Vincent Guittot
2022-05-13 7:12 ` David Laight [this message]
2022-05-13 14:29 ` [PATCH v2 0/7] Add latency_nice priority Vincent Guittot
2022-05-13 21:44 ` Tim Chen
2022-05-19 14:16 ` Vincent Guittot
2022-05-19 18:14 ` Chris Hyser
2022-05-20 18:46 ` Tim Chen
2022-05-23 12:52 ` Vincent Guittot
2022-05-23 13:19 ` David Laight
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=86066641739c4897b0001153e598a261@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=chris.hyser@oracle.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=parth@linux.ibm.com \
--cc=patrick.bellasi@matbug.net \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=qais.yousef@arm.com \
--cc=qperret@google.com \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®