All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuyang Du <yuyang.du@intel.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: mingo@kernel.org, peterz@infradead.org,
	linux-kernel@vger.kernel.org, pjt@google.com, bsegall@google.com,
	morten.rasmussen@arm.com, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, len.brown@intel.com,
	rafael.j.wysocki@intel.com, fengguang.wu@intel.com,
	srikar@linux.vnet.ibm.com
Subject: Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking
Date: Mon, 22 Jun 2015 06:43:06 +0800	[thread overview]
Message-ID: <20150621224306.GC3933@intel.com> (raw)
In-Reply-To: <20150619122207.GB5331@fixme-laptop.cn.ibm.com>

On Fri, Jun 19, 2015 at 08:22:07PM +0800, Boqun Feng wrote:
> > It is not the rewrite patch "lacks" aggregation, it is needless. The stock
> > has to do a bottom-up update and aggregate, because 1) it updates the
> > load at an entity granularity, 2) the blocked load is separate.
> 
> Yep, you are right, the aggregation is not necessary.
> 
> Let me see if I understand you, in the rewrite, when we
> update_cfs_rq_load_avg() we need neither to aggregate child's load_avg,
> nor to update cfs_rq->load.weight. Because:
> 
> 1) For the load before cfs_rq->last_update_time, it's already in the
> ->load_avg, and decay will do the job.
> 2) For the load from cfs_rq->last_update_time to now, we calculate
> with cfs_rq->load.weight, and the weight should be weight at
> ->last_update_time rather than now.
> 
> Right?
 
Yes.

> > If update_cfs_shares() is done here, it is good, but probably not necessary
> > though. However, we do need to update_tg_load_avg() here, because if cfs_rq's
> 
> We may have another problem even we udpate_tg_load_avg(), because after
> the loop, for each cfs_rq, ->load.weight is not up-to-date, right? So
> next time before we update_cfs_rq_load_avg(), we need to guarantee that
> the cfs_rq->load.weight is already updated, right? And IMO, we don't
> have that guarantee yet, do we?

If we update weight, we must update load_avg. But if we update load_avg, we may need
to update weight. Yes, your comment here is valid, but we already update the shares
as needed in the cases when they are "active", update_blocked_averages() is
largely for inactive group entities, so we should be fine here.
 
> > load change, the parent tg's load_avg should change too. I will upload a next
> > version soon.
> > 
> > In addition, an update to the stress + dbench test case:
> > 
> > I have a Core i7, not a Xeon Nehalem, and I have a patch that may not impact
> > the result. Then, the dbench runs at very low CPU utilization ~1%. Boqun said
> > this may result from cgroup control, the dbench I/O is low.
> > 
> > Anyway, I can't reproduce the results, the CPU0's util is 92+%, and other CPUs
> > have ~100% util.
> 
> Thank you for looking into that problem, and I will test with your new
> version of patch ;-)
 
That would be good. I played the dbench "as is", and its output looks pretty fine.

Thanks,
Yuyang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2015-06-22  6:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 19:26 [Resend PATCH v8 0/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du
2015-06-15 19:26 ` [PATCH v8 1/4] sched: Remove rq's runnable avg Yuyang Du
2015-06-19 18:27   ` Dietmar Eggemann
2015-06-21 22:26     ` Yuyang Du
2015-06-22 18:18       ` Dietmar Eggemann
2015-06-15 19:26 ` [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du
2015-06-19  6:00   ` Boqun Feng
2015-06-18 23:05     ` Yuyang Du
2015-06-19  7:57       ` Boqun Feng
2015-06-19  3:11         ` Yuyang Du
2015-06-19 12:22           ` Boqun Feng
2015-06-21 22:43             ` Yuyang Du [this message]
2015-06-15 19:26 ` [PATCH v8 3/4] sched: Init cfs_rq's sched_entity load average Yuyang Du
2015-06-15 19:26 ` [PATCH v8 4/4] sched: Remove task and group entity load when they are dead Yuyang Du
     [not found] ` <20150617030650.GB5695@fixme-laptop.cn.ibm.com>
2015-06-17  5:15   ` [Resend PATCH v8 0/4] sched: Rewrite runnable load and utilization average tracking Boqun Feng
2015-06-17  3:11     ` Yuyang Du
2015-06-17 13:06       ` Boqun Feng
2015-06-17 19:04         ` Yuyang Du
2015-06-18  6:31       ` Wanpeng Li
2015-06-17 22:46         ` Yuyang Du
2015-06-18 11:48           ` Wanpeng Li
2015-06-18 18:25             ` Yuyang Du
2015-06-19  3:33               ` Wanpeng Li
     [not found] <1432518587-114210-1-git-send-email-yuyang.du@intel.com>
     [not found] ` <1432518587-114210-3-git-send-email-yuyang.du@intel.com>
2015-05-26 16:06   ` [PATCH v8 2/4] " Vincent Guittot
2015-05-27 22:36     ` Yuyang Du

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=20150621224306.GC3933@intel.com \
    --to=yuyang.du@intel.com \
    --cc=boqun.feng@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=fengguang.wu@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srikar@linux.vnet.ibm.com \
    --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 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.