From: Patrick Bellasi <patrick.bellasi@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Parth Shah <parth@linux.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
subhra mazumdar <subhra.mazumdar@oracle.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Valentin Schneider <valentin.schneider@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Paul Turner <pjt@google.com>,
Quentin Perret <quentin.perret@arm.com>,
Dhaval Giani <dhaval.giani@oracle.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Tejun Heo <tj@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Qais Yousef <qais.yousef@arm.com>,
Patrick Bellasi <patrick.bellasi@matbug.net>
Subject: Re: Usecases for the per-task latency-nice attribute
Date: Wed, 18 Sep 2019 16:46:18 +0100 [thread overview]
Message-ID: <87v9tp1ub9.fsf@arm.com> (raw)
In-Reply-To: <CAKfTPtAF1WM6tCktgyyj=SLfJGT0qT5e_2Fu+SVheyfrJ-pg2A@mail.gmail.com>
On Wed, Sep 18, 2019 at 16:22:32 +0100, Vincent Guittot wrote...
> On Wed, 18 Sep 2019 at 16:19, Patrick Bellasi <patrick.bellasi@arm.com> wrote:
[...]
>> $> Wakeup path tunings
>> ==========================
>>
>> Some additional possible use-cases was already discussed in [3]:
>>
>> - dynamically tune the policy of a task among SCHED_{OTHER,BATCH,IDLE}
>> depending on crossing certain pre-configured threshold of latency
>> niceness.
>>
>> - dynamically bias the vruntime updates we do in place_entity()
>> depending on the actual latency niceness of a task.
>>
>> PeterZ thinks this is dangerous but that we can "(carefully) fumble a
>> bit there."
>
> I agree with Peter that we can easily break the fairness if we bias vruntime
Just to be more precise here and also to better understand, here I'm
talking about turning the tweaks we already have for:
- START_DEBIT
- GENTLE_FAIR_SLEEPERS
a bit more parametric and proportional to the latency-nice of a task.
In principle, if a task declares a positive latency niceness, could we
not read this also as "I accept to be a bit penalised in terms of
fairness at wakeup time"?
Whatever tweaks we do there should affect anyway only one sched_latency
period... although I'm not yet sure if that's possible and how.
>> - bias the decisions we take in check_preempt_tick() still depending
>> on a relative comparison of the current and wakeup task latency
>> niceness values.
>
> This one seems possible as it will mainly enable a task to preempt
> "earlier" the running task but will not break the fairness
> So the main impact will be the number of context switch between tasks
> to favor or not the scheduling latency
Preempting before is definitively a nice-to-have feature.
At the same time it's interesting a support where a low latency-nice
task (e.g. TOP_APP) RUNNABLE on a CPU has better chances to be executed
up to completion without being preempted by an high latency-nice task
(e.g. BACKGROUND) waking up on its CPU.
For that to happen, we need a mechanism to "delay" the execution of a
less important RUNNABLE task up to a certain period.
It's impacting the fairness, true, but latency-nice in this case will
means that we want to "complete faster", not just "start faster".
Is this definition something we can reason about?
Best,
Patrick
--
#include <best/regards.h>
Patrick Bellasi
next prev parent reply other threads:[~2019-09-18 15:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 12:41 Usecases for the per-task latency-nice attribute Parth Shah
2019-09-18 14:18 ` Patrick Bellasi
2019-09-18 15:22 ` Vincent Guittot
2019-09-18 15:46 ` Patrick Bellasi [this message]
2019-09-18 16:00 ` Vincent Guittot
2019-09-18 15:42 ` Valentin Schneider
2019-09-19 16:41 ` Parth Shah
2019-09-19 18:07 ` Valentin Schneider
2019-09-27 13:53 ` Pavel Machek
2019-09-19 7:01 ` Parth Shah
2019-09-18 17:16 ` Tim Chen
2019-09-19 8:37 ` Parth Shah
2019-09-19 16:27 ` Tim Chen
2019-09-19 9:06 ` David Laight
2019-09-19 16:30 ` Tim Chen
2019-09-19 14:43 ` Qais Yousef
2019-09-20 10:45 ` Parth Shah
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=87v9tp1ub9.fsf@arm.com \
--to=patrick.bellasi@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dhaval.giani@oracle.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=parth@linux.ibm.com \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=qais.yousef@arm.com \
--cc=quentin.perret@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=subhra.mazumdar@oracle.com \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=valentin.schneider@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).