From: Peter Zijlstra <peterz@infradead.org>
To: Yuyang Du <yuyang.du@intel.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
bsegall@google.com, pjt@google.com, morten.rasmussen@arm.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
juri.lelli@arm.com
Subject: Re: [PATCH v2 05/12] sched/fair: Optimize __update_sched_avg()
Date: Tue, 3 May 2016 10:49:01 +0200 [thread overview]
Message-ID: <20160503084901.GI3430@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1462226078-31904-6-git-send-email-yuyang.du@intel.com>
On Tue, May 03, 2016 at 05:54:31AM +0800, Yuyang Du wrote:
> __update_sched_avg() has these steps:
> 1. add the left of the last incomplete period
> 2. decay old sum
> 3. accumulate new sum since last_update_time
> 4. add the current incomplete period
> 5. update averages
>
> Previously, we separately computed steps 1, 3, and 4, leading to
> each one of them ugly in codes and costly in overhead. But actually
> they all do the same thing, so we combine them together. The result
> will be much cleaner codes and less CPU cycles.
I would very much like to see an explanation of how we can fold all that
here. Without me having to untangle the code first.
That also helps me to verify if the code does indeed implement what you
meant it to, etc..
next prev parent reply other threads:[~2016-05-03 8:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 21:54 [PATCH v2 00/12] sched/fair: Optimize and clean up sched averages Yuyang Du
2016-05-02 21:54 ` [PATCH v2 01/12] sched/fair: Optimize sum computation with a lookup table Yuyang Du
2016-05-05 9:41 ` [tip:sched/core] " tip-bot for Yuyang Du
2016-05-02 21:54 ` [PATCH v2 02/12] sched/fair: Rename variable names for sched averages Yuyang Du
2016-05-02 21:54 ` [PATCH v2 03/12] sched/fair: Change the variable to hold the number of periods to 32bit integer Yuyang Du
2016-05-03 8:47 ` Peter Zijlstra
2016-05-02 21:54 ` [PATCH v2 04/12] sched/fair: Add __always_inline compiler attribute to __accumulate_sum() Yuyang Du
2016-05-02 21:54 ` [PATCH v2 05/12] sched/fair: Optimize __update_sched_avg() Yuyang Du
2016-05-03 8:49 ` Peter Zijlstra [this message]
2016-05-02 21:54 ` [PATCH v2 06/12] documentation: Add scheduler/sched-avg.txt Yuyang Du
2016-05-03 8:50 ` Peter Zijlstra
2016-05-02 21:54 ` [PATCH v2 07/12] sched/fair: Generalize the load/util averages resolution definition Yuyang Du
2016-05-02 21:54 ` [PATCH v2 08/12] sched/fair: Remove SCHED_LOAD_SHIFT and SCHED_LOAD_SCALE Yuyang Du
2016-05-02 21:54 ` [PATCH v2 09/12] sched/fair: Add introduction to the sched average metrics Yuyang Du
2016-05-02 21:54 ` [PATCH v2 10/12] sched/fair: Remove scale_load_down() for load_avg Yuyang Du
2016-05-02 21:54 ` [PATCH v2 11/12] sched/fair: Rename scale_load() and scale_load_down() Yuyang Du
2016-05-02 21:54 ` [PATCH v2 12/12] sched/fair: Enable increased scale for kernel load Yuyang Du
2016-05-02 22:08 ` [PATCH v2 00/12] sched/fair: Optimize and clean up sched averages 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=20160503084901.GI3430@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=pjt@google.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