[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BLU436-SMTP1421419BB7C28F1301F6EF6C07B0@phx.gbl>
Date: Sat, 15 Aug 2015 20:34:17 +0800
From: "T. Zhou" <t.s.zhou@...mail.com>
To: Byungchul Park <byungchul.park@....com>
CC: mingo@...nel.org, peterz@...radead.org,
linux-kernel@...r.kernel.org, yuyang.du@...el.com
Subject: Re: [PATCH] sched: sync with the cfs_rq when changing sched class
On Sat, Aug 15, 2015 at 01:24:12PM +0900, Byungchul Park wrote:
> On Fri, Aug 14, 2015 at 08:59:02PM +0800, T. Zhou wrote:
> > Hi,
> >
> > On Thu, Aug 13, 2015 at 02:55:55PM +0900, byungchul.park@....com wrote:
> > > +static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
> > > +{
> > > + se->avg.last_update_time = cfs_rq->avg.last_update_time;
> > > + cfs_rq->avg.load_avg += se->avg.load_avg;
> > > + cfs_rq->avg.load_sum += se->avg.load_sum;
> > > + cfs_rq->avg.util_avg += se->avg.util_avg;
> > > + cfs_rq->avg.util_sum += se->avg.util_sum;
> > > +}
> >
> > I see this function is used in enqueue_entity_load_avg() also.
> > In tip tree code, enqueue_entity_load_avg() uses cfs_rq_clock_task()
> > as se->last_update_time in migration condition.
> > Here, you use cfs_rq->avg.last_update_time as se->last_update_time.
> > If se->last_update_time is different, next decay may be different too.
> > Just from inspecting code, maybe some reasonable there?
>
> hello zhou,
>
> update_cfs_rq_load_avg() would update cfs_rq->avg.last_update_time to now,
> which is returned from cfs_rq_clock_task(). :)
>
> thanks,
> byungchul
>
Hi Byungchul,
yes, you are right. se and cfs_rq update load avg at same time. :)
thanks
--
Tao
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists