linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: pkondeti@codeaurora.org
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	Paul Turner <pjt@google.com>, Ben Segall <bsegall@google.com>,
	Thara Gopinath <thara.gopinath@linaro.org>
Subject: Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT
Date: Tue, 30 Oct 2018 11:50:05 +0100	[thread overview]
Message-ID: <CAKfTPtCFop-mxb206HkFva4vOEWpc4r-DVfEkVMKPZf8C1V-eA@mail.gmail.com> (raw)
In-Reply-To: <20181030091938.GE27587@codeaurora.org>

Hi Pavan,

On Tue, 30 Oct 2018 at 10:19, Pavan Kondeti <pkondeti@codeaurora.org> wrote:
>
> Hi Vincent,
>
> On Fri, Oct 26, 2018 at 06:11:43PM +0200, Vincent Guittot wrote:
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 6806c27..7a69673 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -674,9 +674,8 @@ static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se)
> >       return calc_delta_fair(sched_slice(cfs_rq, se), se);
> >  }
> >
> > -#ifdef CONFIG_SMP
> >  #include "pelt.h"
> > -#include "sched-pelt.h"
> > +#ifdef CONFIG_SMP
> >
> >  static int select_idle_sibling(struct task_struct *p, int prev_cpu, int cpu);
> >  static unsigned long task_h_load(struct task_struct *p);
> > @@ -764,7 +763,7 @@ void post_init_entity_util_avg(struct sched_entity *se)
> >                        * such that the next switched_to_fair() has the
> >                        * expected state.
> >                        */
> > -                     se->avg.last_update_time = cfs_rq_clock_task(cfs_rq);
> > +                     se->avg.last_update_time = cfs_rq_clock_pelt(cfs_rq);
> >                       return;
> >               }
> >       }
> > @@ -3466,7 +3465,7 @@ static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s
> >  /* Update task and its cfs_rq load average */
> >  static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
> >  {
> > -     u64 now = cfs_rq_clock_task(cfs_rq);
> > +     u64 now = cfs_rq_clock_pelt(cfs_rq);
> >       struct rq *rq = rq_of(cfs_rq);
> >       int cpu = cpu_of(rq);
> >       int decayed;
> > @@ -6694,6 +6693,12 @@ done: __maybe_unused;
> >       if (new_tasks > 0)
> >               goto again;
> >
> > +     /*
> > +      * rq is about to be idle, check if we need to update the
> > +      * lost_idle_time of clock_pelt
> > +      */
> > +     update_idle_rq_clock_pelt(rq);
> > +
> >       return NULL;
> >  }
>
> Do you think it is better to call this from pick_next_task_idle()? I don't see
> any functional difference, but it may be easier to follow.

Yes there is no functional difference. I have put it there just for
simplicity as there is no pelt related code in idle.c and keep things
contained

>
> Thanks,
> Pavan
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>

  reply	other threads:[~2018-10-30 10:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 16:11 [PATCH v5 0/2] sched/fair: update scale invariance of PELT Vincent Guittot
2018-10-26 16:11 ` [PATCH v5 1/2] sched/fair: move rq_of helper function Vincent Guittot
2018-10-26 16:11 ` [PATCH v5 2/2] sched/fair: update scale invariance of PELT Vincent Guittot
2018-10-30  9:19   ` Pavan Kondeti
2018-10-30 10:50     ` Vincent Guittot [this message]
2018-10-31  7:20   ` Dietmar Eggemann
2018-10-31  9:18     ` Vincent Guittot
2018-11-01  9:38       ` Dietmar Eggemann
2018-11-05  7:59         ` Vincent Guittot
2018-11-02 15:36   ` Dietmar Eggemann
2018-11-05  9:10     ` Vincent Guittot
2018-11-05 14:58       ` Morten Rasmussen
2018-11-06 14:27         ` Vincent Guittot
2018-11-06 14:59         ` Peter Zijlstra
2018-11-07 10:47       ` Dietmar Eggemann
2018-11-07 12:58         ` Vincent Guittot
2018-11-08 11:35         ` Quentin Perret
2018-11-08 16:04           ` 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=CAKfTPtCFop-mxb206HkFva4vOEWpc4r-DVfEkVMKPZf8C1V-eA@mail.gmail.com \
    --to=vincent.guittot@linaro.org \
    --cc=Morten.Rasmussen@arm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrick.bellasi@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=pkondeti@codeaurora.org \
    --cc=rjw@rjwysocki.net \
    --cc=thara.gopinath@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).