From: Parth Shah <parth@linux.ibm.com>
To: Qais Yousef <qais.yousef@arm.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
mingo@redhat.com, vincent.guittot@linaro.org,
patrick.bellasi@matbug.net, valentin.schneider@arm.com,
pavel@ucw.cz, dhaval.giani@oracle.com, qperret@qperret.net,
David.Laight@ACULAB.COM, morten.rasmussen@arm.com,
pjt@google.com, tj@kernel.org, dietmar.eggemann@arm.com,
viresh.kumar@linaro.org, rafael.j.wysocki@intel.com,
daniel.lezcano@linaro.org
Subject: Re: [RFC 1/3] Introduce latency-tolerance as an per-task attribute
Date: Tue, 3 Dec 2019 21:17:11 +0530 [thread overview]
Message-ID: <59044b60-a7d8-9508-4975-06afdcfd33cd@linux.ibm.com> (raw)
In-Reply-To: <20191203083654.3ctttimdiujdt7tl@e107158-lin.cambridge.arm.com>
On 12/3/19 2:06 PM, Qais Yousef wrote:
> On 11/25/19 15:16, Parth Shah wrote:
>> Latency-tolerance indicates the latency requirements of a task with respect
>> to the other tasks in the system. The value of the attribute can be within
>> the range of [-20, 19] both inclusive to be in-line with the values just
>> like task nice values.
>>
>> latency_tolerance = -20 indicates the task to have the least latency as
>> compared to the tasks having latency_tolerance = +19.
>>
>> The latency_tolerance may affect only the CFS SCHED_CLASS by getting
>> latency requirements from the userspace.
>>
>> Signed-off-by: Parth Shah <parth@linux.ibm.com>
>> ---
>> include/linux/sched.h | 3 +++
>> include/linux/sched/latency_tolerance.h | 13 +++++++++++++
>> 2 files changed, 16 insertions(+)
>> create mode 100644 include/linux/sched/latency_tolerance.h
>>
>> diff --git a/include/linux/sched.h b/include/linux/sched.h
>> index 2c2e56bd8913..bcc1c1d0856d 100644
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -25,6 +25,7 @@
>> #include <linux/resource.h>
>> #include <linux/latencytop.h>
>> #include <linux/sched/prio.h>
>> +#include <linux/sched/latency_tolerance.h>
>> #include <linux/sched/types.h>
>> #include <linux/signal_types.h>
>> #include <linux/mm_types_task.h>
>> @@ -666,6 +667,8 @@ struct task_struct {
>> #endif
>> int on_rq;
>>
>> + int latency_tolerance;
>> +
>> int prio;
>> int static_prio;
>> int normal_prio;
>> diff --git a/include/linux/sched/latency_tolerance.h b/include/linux/sched/latency_tolerance.h
>> new file mode 100644
>> index 000000000000..7a00abe05bc4
>> --- /dev/null
>> +++ b/include/linux/sched/latency_tolerance.h
>> @@ -0,0 +1,13 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef _LINUX_SCHED_LATENCY_TOLERANCE_H
>> +#define _LINUX_SCHED_LATENCY_TOLERANCE_H
>
> nit: Add some description here explaining what latency tolerance is please. You
> copy paste some text from your cover letter :)
Sure. Will add some text here.
>
> --
> Qais Youesf
>
>> +
>> +#define MAX_LATENCY_TOLERANCE 19
>> +#define MIN_LATENCY_TOLERANCE -20
>> +
>> +#define LATENCY_TOLERANCE_WIDTH \
>> + (MAX_LATENCY_TOLERANCE - MIN_LATENCY_TOLERANCE + 1)
>> +
>> +#define DEFAULT_LATENCY_TOLERANCE 0
>> +
>> +#endif /* _LINUX_SCHED_LATENCY_TOLERANCE_H */
>> --
>> 2.17.2
>>
next prev parent reply other threads:[~2019-12-03 15:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-25 9:46 [RFC 0/3] Introduce per-task latency_tolerance for scheduler hints Parth Shah
2019-11-25 9:46 ` [RFC 1/3] Introduce latency-tolerance as an per-task attribute Parth Shah
2019-12-03 8:36 ` Qais Yousef
2019-12-03 15:47 ` Parth Shah [this message]
2019-12-05 9:24 ` Dietmar Eggemann
2019-12-05 11:42 ` Parth Shah
2019-11-25 9:46 ` [RFC 2/3] Propagate parent task's latency requirements to the child task Parth Shah
2019-11-25 9:46 ` [RFC 3/3] Allow sched_{get,set}attr to change latency_tolerance of the task Parth Shah
2019-12-03 8:39 ` Qais Yousef
2019-12-03 15:51 ` Parth Shah
2019-12-05 9:24 ` Dietmar Eggemann
2019-12-06 16:04 ` Dietmar Eggemann
2019-12-08 5:52 ` Parth Shah
2019-12-05 9:24 ` [RFC 0/3] Introduce per-task latency_tolerance for scheduler hints Dietmar Eggemann
2019-12-05 10:49 ` Valentin Schneider
2019-12-05 14:03 ` Dietmar Eggemann
2019-12-05 17:13 ` Parth Shah
2019-12-06 12:31 ` Dietmar Eggemann
2019-12-08 5:57 ` 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=59044b60-a7d8-9508-4975-06afdcfd33cd@linux.ibm.com \
--to=parth@linux.ibm.com \
--cc=David.Laight@ACULAB.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=patrick.bellasi@matbug.net \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=qais.yousef@arm.com \
--cc=qperret@qperret.net \
--cc=rafael.j.wysocki@intel.com \
--cc=tj@kernel.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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