From: Steve Muckle <steve.muckle@linaro.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Juri Lelli <Juri.Lelli@arm.com>,
Patrick Bellasi <patrick.bellasi@arm.com>,
Michael Turquette <mturquette@baylibre.com>
Subject: Re: [PATCH 1/2] sched/fair: move cpufreq hook to update_cfs_rq_load_avg()
Date: Mon, 28 Mar 2016 09:34:24 -0700 [thread overview]
Message-ID: <56F95D10.4070400@linaro.org> (raw)
In-Reply-To: <56F91D56.4020007@arm.com>
Hi Dietmar,
On 03/28/2016 05:02 AM, Dietmar Eggemann wrote:
> Hi Steve,
>
> these patches fall into the bucket of 'optimization of updating the
> value only if the root cfs_rq util has changed' as discussed in '[PATCH
> 5/8] sched/cpufreq: pass sched class into cpufreq_update_util' of Mike
> T's current series '[PATCH 0/8] schedutil enhancements', right?
I would say just the second patch is an optimization. The first and
third patches cover additional paths in CFS where the hook should be
called but currently is not, which I think is a correctness issue.
> I wonder if it makes sense to apply them before a proper 'capacity vote
> aggregation from CFS/RT/DL' has been agreed upon?
Getting the right call sites for the hook in CFS should be orthogonal to
the sched class vote aggregation IMO.
> Otherwise I agree with the changes in your 3 patches (inc. "[RFC PATCH]
> sched/fair: call cpufreq hook in additional paths") to only invoke
> cpufreq_update_util() if &rq->cfs.avg.util_avg has really changed.
>
>
> On 03/22/2016 01:21 AM, Steve Muckle wrote:
>> The cpufreq hook should be called whenever the root cfs_rq
>> utilization changes so update_cfs_rq_load_avg() is a better
>> place for it. The current location is not invoked in the
>> enqueue_entity() or update_blocked_averages() paths.
>>
>> Suggested-by: Vincent Guittot <vincent.guittot@linaro.org>
>> Signed-off-by: Steve Muckle <smuckle@linaro.org>
>> ---
>> kernel/sched/fair.c | 50
>> ++++++++++++++++++++++++++------------------------
>> 1 file changed, 26 insertions(+), 24 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 46d64e4ccfde..d418deb04049 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -2825,7 +2825,9 @@ static inline u64 cfs_rq_clock_task(struct
>> cfs_rq *cfs_rq);
>> static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq
>> *cfs_rq)
>> {
>> struct sched_avg *sa = &cfs_rq->avg;
>> + struct rq *rq = rq_of(cfs_rq);
>> int decayed, removed = 0;
>> + int cpu = cpu_of(rq);
>>
>> if (atomic_long_read(&cfs_rq->removed_load_avg)) {
>> s64 r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0);
>> @@ -2840,7 +2842,7 @@ static inline int update_cfs_rq_load_avg(u64
>> now, struct cfs_rq *cfs_rq)
>> sa->util_sum = max_t(s32, sa->util_sum - r * LOAD_AVG_MAX, 0);
>> }
>>
>> - decayed = __update_load_avg(now, cpu_of(rq_of(cfs_rq)), sa,
>> + decayed = __update_load_avg(now, cpu, sa,
>> scale_load_down(cfs_rq->load.weight), cfs_rq->curr != NULL,
>> cfs_rq);
>
> Why did you change these 3 lines above? You reverted this back in "[RFC
> PATCH] sched/fair: call cpufreq hook in additional paths".
If all three patches are accepted in principle I can restructure them if
so desired. I did not want to introduce a dependency between them and
patch 2 represents the cleanest implementation at that point.
Thanks for the review!
thanks,
Steve
next prev parent reply other threads:[~2016-03-28 16:34 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 0:21 [PATCH 1/2] sched/fair: move cpufreq hook to update_cfs_rq_load_avg() Steve Muckle
2016-03-22 0:21 ` [PATCH 2/2] sched/fair: do not call cpufreq hook unless util changed Steve Muckle
2016-03-24 23:47 ` Sai Gurrappadi
2016-03-25 1:01 ` Steve Muckle
2016-03-25 21:24 ` Sai Gurrappadi
2016-03-28 12:02 ` [PATCH 1/2] sched/fair: move cpufreq hook to update_cfs_rq_load_avg() Dietmar Eggemann
2016-03-28 16:34 ` Steve Muckle [this message]
2016-03-28 18:30 ` Dietmar Eggemann
2016-03-28 19:38 ` Steve Muckle
2016-03-30 19:35 ` Peter Zijlstra
2016-03-31 1:42 ` Steve Muckle
2016-03-31 7:37 ` Peter Zijlstra
2016-03-31 21:26 ` Steve Muckle
2016-04-01 9:20 ` Peter Zijlstra
2016-04-11 19:28 ` Steve Muckle
2016-04-11 21:20 ` Rafael J. Wysocki
2016-04-12 14:29 ` Rafael J. Wysocki
2016-04-12 19:38 ` Steve Muckle
2016-04-13 14:45 ` Rafael J. Wysocki
2016-04-13 17:53 ` Steve Muckle
2016-04-13 19:39 ` Rafael J. Wysocki
2016-04-13 0:08 ` Steve Muckle
2016-04-13 4:48 ` Rafael J. Wysocki
2016-04-13 16:05 ` Rafael J. Wysocki
2016-04-13 16:07 ` Rafael J. Wysocki
2016-04-13 18:06 ` Steve Muckle
2016-04-13 19:50 ` Rafael J. Wysocki
2016-04-20 2:22 ` Steve Muckle
2016-03-31 9:27 ` Vincent Guittot
2016-03-31 9:34 ` Peter Zijlstra
2016-03-31 9:50 ` Vincent Guittot
2016-03-31 10:47 ` Peter Zijlstra
2016-03-31 12:14 ` Vincent Guittot
2016-03-31 12:34 ` Peter Zijlstra
2016-03-31 12:50 ` Vincent Guittot
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=56F95D10.4070400@linaro.org \
--to=steve.muckle@linaro.org \
--cc=Juri.Lelli@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=mturquette@baylibre.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--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 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).