linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Yuyang Du <yuyang.du@intel.com>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pjt@google.com" <pjt@google.com>,
	"bsegall@google.com" <bsegall@google.com>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>,
	"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
	"len.brown@intel.com" <len.brown@intel.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"fengguang.wu@intel.com" <fengguang.wu@intel.com>,
	"boqun.feng@gmail.com" <boqun.feng@gmail.com>,
	"srikar@linux.vnet.ibm.com" <srikar@linux.vnet.ibm.com>
Subject: Re: [PATCH v8 1/4] sched: Remove rq's runnable avg
Date: Mon, 22 Jun 2015 19:18:05 +0100	[thread overview]
Message-ID: <5588515D.1020505@arm.com> (raw)
In-Reply-To: <20150621222601.GB3933@intel.com>

On 21/06/15 23:26, Yuyang Du wrote:
> Hi Dietmar,
> 
> On Fri, Jun 19, 2015 at 07:27:24PM +0100, Dietmar Eggemann wrote:
>> Hi Yuyang,
>>
>> On 15/06/15 20:26, Yuyang Du wrote:
>>> The current rq->avg is not used at all since its merge into kernel,
>>> and the code is in the scheduler's hot path, so remove it.
>>
>> are you sure that this is the case? I was always under the impression
>> that w/ CONFIG_FAIR_GROUP_SCHED=y rq->avg (runnable_avg_sum, avg_period)
>> is used to calculate contrib in __update_tg_runnable_avg() for the root
>> group (cfs_rq->tg->css.id = 1).
>>
>> On tg's w/ cfs_rq->tg->css.id > 1, se->avg (runnable_avg_sum,
>> avg_period) is used instead but we simply don't have a tg related se for
>> the root group. IMHO, that's why we have this rq::avg.
>  
> Yes, I agree. But the root group's avg is not useful anyway. If it is,
> we sure should keep it.

You're right. Both consumers of tg->load_avg and tg->runnable_avg
(__update_group_entity_contrib() and calc_tg_weight()) are never called
w/ cfs_rq->tg->css.id < 2 .

I did some tests w/ task groups on my ARM platform. The system survives
an appropriate BUG_ON in both functions just fine.

Maybe you can put a little bit more information why rq::avg isn't needed
even in the CONFIG_FAIR_GROUP_SCHED=y case into the patch header?

I assume getting rid of extra code in the current per-entity
load-tracking code is a good thing. And this patch is probably less
complicated to understand than your second one :-)

> 
>> I understand that w/ the second patch in your series you don't need
>> rq::avg any more.
> 
> And the rq->avg can be replaced by the root cfs_rq's util_avg, too.

Given the fact that it is not used this wouldn't be necessary.

[...]

--
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 18:18 UTC|newest]

Thread overview: 23+ 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 [this message]
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
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

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=5588515D.1020505@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=Morten.Rasmussen@arm.com \
    --cc=boqun.feng@gmail.com \
    --cc=bsegall@google.com \
    --cc=fengguang.wu@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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 \
    --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).