linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: peterz@infradead.org
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Jiang Biao <benbjiang@gmail.com>, Ingo Molnar <mingo@redhat.com>,
	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:58:29 +0200	[thread overview]
Message-ID: <20200820125829.GT2674@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtABCbEuYf3uup5ZODyPXpUqBjgM8A5gBQqM0cQGxWk5zw@mail.gmail.com>

On Thu, Aug 20, 2020 at 02:51:06PM +0200, Vincent Guittot wrote:
> 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.

This is rather week. It would be much better if there's some actual data
to support this claim.

> > 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 ?

Then we very much need it, because it might have fair tasks inside. I
suppose you could do something complicated with idle_h_nr_running, but
is all that really worth the effort?

> >                 unsigned long thresh = sysctl_sched_latency;
> >
> >                 /*
> > --
> > 2.21.0
> >

  reply	other threads:[~2020-08-20 12:59 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
2020-08-20 12:58   ` peterz [this message]
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=20200820125829.GT2674@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.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=rostedt@goodmis.org \
    --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).