From: Vincent Guittot <vincent.guittot@linaro.org>
To: Jiang Biao <benbjiang@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jiang Biao <benbjiang@tencent.com>
Subject: Re: [PATCH] sched/fair: avoid vruntime compensation for SCHED_IDLE task
Date: Thu, 20 Aug 2020 14:51:06 +0200 [thread overview]
Message-ID: <CAKfTPtABCbEuYf3uup5ZODyPXpUqBjgM8A5gBQqM0cQGxWk5zw@mail.gmail.com> (raw)
In-Reply-To: <20200820120025.74460-1-benbjiang@tencent.com>
On Thu, 20 Aug 2020 at 14:00, Jiang Biao <benbjiang@gmail.com> wrote:
>
> From: Jiang Biao <benbjiang@tencent.com>
>
> Vruntime compensation has been down in place_entity() to
> boot the waking procedure for fair tasks. There is no need to
s/boot/boost/ ?
> do that for SCHED_IDLE task actually.
>
> Not compensating vruntime for SCHED_IDLE task could make
> SCHED_IDLE task more harmless for normal tasks.
>
> Signed-off-by: Jiang Biao <benbjiang@tencent.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 1a68a0536add..adff77676a0a 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4115,7 +4115,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
> vruntime += sched_vslice(cfs_rq, se);
>
> /* sleeps up to a single latency don't count. */
> - if (!initial) {
> + if (!initial && likely(!task_has_idle_policy(task_of(se)))) {
What if se is not a task ?
> unsigned long thresh = sysctl_sched_latency;
>
> /*
> --
> 2.21.0
>
next prev parent reply other threads:[~2020-08-20 12:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 12:00 [PATCH] sched/fair: avoid vruntime compensation for SCHED_IDLE task Jiang Biao
2020-08-20 12:51 ` Vincent Guittot [this message]
2020-08-20 12:58 ` peterz
2020-08-20 13:15 ` Vincent Guittot
2020-08-20 13:43 ` peterz
2020-08-20 14:09 ` Vincent Guittot
2020-08-20 14:24 ` Jiang Biao
2020-08-23 7:33 ` Jiang Biao
2020-08-28 12:55 ` Vincent Guittot
2020-09-01 10:14 ` Jiang Biao
2020-09-01 13:04 ` Vincent Guittot
2020-09-01 14:19 ` Jiang Biao
2020-08-20 14:19 ` Jiang Biao
2020-08-20 14:15 ` Jiang Biao
2020-08-21 0:37 ` [sched/fair] 88d13f778f: WARNING:at_kernel/sched/fair.c:#place_entity kernel test robot
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=CAKfTPtABCbEuYf3uup5ZODyPXpUqBjgM8A5gBQqM0cQGxWk5zw@mail.gmail.com \
--to=vincent.guittot@linaro.org \
--cc=benbjiang@gmail.com \
--cc=benbjiang@tencent.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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).