linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "T. Zhou" <t.s.zhou@hotmail.com>
To: Byungchul Park <byungchul.park@lge.com>
Cc: mingo@kernel.org, peterz@infradead.org,
	linux-kernel@vger.kernel.org, yuyang.du@intel.com
Subject: Re: [PATCH] sched: sync with the cfs_rq when changing sched class
Date: Sat, 15 Aug 2015 20:34:17 +0800	[thread overview]
Message-ID: <BLU436-SMTP1421419BB7C28F1301F6EF6C07B0@phx.gbl> (raw)
In-Reply-To: <20150815042412.GS3956@byungchulpark-X58A-UD3R>

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@lge.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

      reply	other threads:[~2015-08-15 12:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  5:55 [PATCH] sched: sync with the cfs_rq when changing sched class byungchul.park
2015-08-12 22:41 ` Yuyang Du
2015-08-13  7:19   ` Byungchul Park
2015-08-13  2:30     ` Yuyang Du
2015-08-13  7:46 ` Peter Zijlstra
2015-08-13  8:21   ` Byungchul Park
2015-08-13  2:15     ` Yuyang Du
2015-08-13 10:56       ` Byungchul Park
2015-08-13 15:22       ` Peter Zijlstra
2015-08-13 23:20         ` Yuyang Du
2015-08-14  8:46           ` Peter Zijlstra
2015-08-15  6:52         ` Byungchul Park
2015-08-15  7:16           ` Byungchul Park
2015-08-13  8:42   ` Byungchul Park
2015-08-14 12:59 ` T. Zhou
2015-08-15  4:24   ` Byungchul Park
2015-08-15 12:34     ` T. Zhou [this message]

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=BLU436-SMTP1421419BB7C28F1301F6EF6C07B0@phx.gbl \
    --to=t.s.zhou@hotmail.com \
    --cc=byungchul.park@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yuyang.du@intel.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 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).