All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: Benjamin Segall <bsegall@google.com>
Cc: Chengming Zhou <zhouchengming@bytedance.com>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de,
	bristot@redhat.com, linux-kernel@vger.kernel.org,
	duanxiongchun@bytedance.com, songmuchun@bytedance.com
Subject: Re: [PATCH 2/2] sched/fair: Delete useless condition in tg_unthrottle_up()
Date: Fri, 8 Apr 2022 09:16:58 +0200	[thread overview]
Message-ID: <CAKfTPtAYR-G2X2RnCJKLqS6J-Kn-tZTp9JyzxR3j9jsFbmwZwA@mail.gmail.com> (raw)
In-Reply-To: <xm26pmlsvcah.fsf@bsegall-linux.svl.corp.google.com>

On Thu, 7 Apr 2022 at 23:00, Benjamin Segall <bsegall@google.com> wrote:
>
> Chengming Zhou <zhouchengming@bytedance.com> writes:
>
> > Fully decayed cfs_rq is impossible to have queued entities,
> > the first condition "!cfs_rq_is_decayed(cfs_rq)" is enough
> > to cover.
>
> In particular, cfs_rq->load.weight is part of cfs_rq_is_decayed.

Testing cfs_rq->load.weight is the key point because nothing prevent
to add a task with null load

Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>

>
> Reviewed-by: Ben Segall <bsegall@google.com>
>
> >
> > Signed-off-by: Chengming Zhou <zhouchengming@bytedance.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 e6fa5d1141b4..17c13c38b1c2 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -4850,7 +4850,7 @@ static int tg_unthrottle_up(struct task_group *tg, void *data)
> >                                            cfs_rq->throttled_clock_task;
> >
> >               /* Add cfs_rq with load or one or more already running entities to the list */
> > -             if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
> > +             if (!cfs_rq_is_decayed(cfs_rq))
> >                       list_add_leaf_cfs_rq(cfs_rq);
> >       }

  reply	other threads:[~2022-04-08  7:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  2:17 [PATCH 1/2] sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq Chengming Zhou
2022-04-07  2:17 ` [PATCH 2/2] sched/fair: Delete useless condition in tg_unthrottle_up() Chengming Zhou
2022-04-07 21:00   ` Benjamin Segall
2022-04-08  7:16     ` Vincent Guittot [this message]
2022-04-07 20:57 ` [PATCH 1/2] sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq Benjamin Segall
2022-04-08  6:23   ` [External] " Chengming Zhou
2022-04-08  7:17 ` Vincent Guittot

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=CAKfTPtAYR-G2X2RnCJKLqS6J-Kn-tZTp9JyzxR3j9jsFbmwZwA@mail.gmail.com \
    --to=vincent.guittot@linaro.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=duanxiongchun@bytedance.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 \
    --cc=songmuchun@bytedance.com \
    --cc=zhouchengming@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.