Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1168570
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Yuyang Du <yuyang.du@intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking |
| Date | Fri, 19 Jun 2015 09:00:02 +0200 |
| Message-ID | <pCYro-8ea-13@gated-at.bofh.it> (permalink) |
| References | <pBPzP-6HF-5@gated-at.bofh.it> <pBPzP-6HF-15@gated-at.bofh.it> <pCXEZ-7fE-13@gated-at.bofh.it> |
| X-Original-To | Boqun Feng <boqun.feng@gmail.com> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.13,643,1427785200"; d="scan'208";a="510754260" |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 65 |
| Organization | linux.* mail to news gateway |
| X-Original-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 |
| X-Original-Date | Fri, 19 Jun 2015 07:05:54 +0800 |
| X-Original-Message-ID | <20150618230554.GA3436@intel.com> |
| X-Original-References | <1434396367-27979-1-git-send-email-yuyang.du@intel.com> <1434396367-27979-3-git-send-email-yuyang.du@intel.com> <20150619060038.GA1240@fixme-laptop.cn.ibm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1168570 |
Show key headers only | View raw
On Fri, Jun 19, 2015 at 02:00:38PM +0800, Boqun Feng wrote:
> However, update_cfs_rq_load_avg() only updates cfs_rq->avg, the change
> won't be contributed or aggregated to cfs_rq's parent in the
> for_each_leaf_cfs_rq loop, therefore that's actually not a bottom-up
> update.
>
> To fix this, I think we can add a update_cfs_shares(cfs_rq) after
> update_cfs_rq_load_avg(). Like:
>
> for_each_leaf_cfs_rq(rq, cfs_rq) {
> - /*
> - * Note: We may want to consider periodically releasing
> - * rq->lock about these updates so that creating many task
> - * groups does not result in continually extending hold time.
> - */
> - __update_blocked_averages_cpu(cfs_rq->tg, rq->cpu);
> + /* throttled entities do not contribute to load */
> + if (throttled_hierarchy(cfs_rq))
> + continue;
> +
> + update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq);
> + update_cfs_share(cfs_rq);
> }
>
> However, I think update_cfs_share isn't cheap, because it may do a
> bottom-up update once called. So how about just update the root cfs_rq?
> Like:
>
> - /*
> - * Iterates the task_group tree in a bottom up fashion, see
> - * list_add_leaf_cfs_rq() for details.
> - */
> - for_each_leaf_cfs_rq(rq, cfs_rq) {
> - /*
> - * Note: We may want to consider periodically releasing
> - * rq->lock about these updates so that creating many task
> - * groups does not result in continually extending hold time.
> - */
> - __update_blocked_averages_cpu(cfs_rq->tg, rq->cpu);
> - }
> + update_cfs_rq_load_avg(rq_clock_task(rq), rq->cfs_rq);
Hi Boqun,
Did I get you right:
This rewrite patch does not NEED to aggregate entity's load to cfs_rq,
but rather directly update the cfs_rq's load (both runnable and blocked),
so there is NO NEED to iterate all of the cfs_rqs.
So simply updating the top cfs_rq is already equivalent to the stock.
It is better if we iterate the cfs_rq to update the actually weight
(update_cfs_share), because the weight may have already changed, which
would in turn change the load. But update_cfs_share is not cheap.
Right?
Thanks,
Yuyang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du <yuyang.du@intel.com> - 2015-06-19 09:00 +0200
Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking Boqun Feng <boqun.feng@gmail.com> - 2015-06-19 10:00 +0200
Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking Boqun Feng <boqun.feng@gmail.com> - 2015-06-19 14:30 +0200
Re: [PATCH v8 2/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du <yuyang.du@intel.com> - 2015-06-22 08:40 +0200
csiph-web