From: Steve Muckle <steve.muckle@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Steve Muckle <steve.muckle@linaro.org>,
Juri Lelli <juri.lelli@arm.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [Update][PATCH 1/2] cpufreq / sched: Pass flags to cpufreq_update_util()
Date: Thu, 11 Aug 2016 11:03:47 -0700 [thread overview]
Message-ID: <20160811180347.GB14324@graphite.smuckle.net> (raw)
In-Reply-To: <1878295.pk6FjfzjrR@vostro.rjw.lan>
On Wed, Aug 10, 2016 at 03:49:07AM +0200, Rafael J. Wysocki wrote:
> Index: linux-pm/kernel/sched/fair.c
> ===================================================================
> --- linux-pm.orig/kernel/sched/fair.c
> +++ linux-pm/kernel/sched/fair.c
> @@ -2875,11 +2875,8 @@ static inline void update_tg_load_avg(st
>
> static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq)
> {
> - struct rq *rq = rq_of(cfs_rq);
> - int cpu = cpu_of(rq);
> -
> - if (cpu == smp_processor_id() && &rq->cfs == cfs_rq) {
> - unsigned long max = rq->cpu_capacity_orig;
> + if (&this_rq()->cfs == cfs_rq) {
> + struct rq *rq = rq_of(cfs_rq);
>
> /*
> * There are a few boundary cases this might miss but it should
> @@ -2897,8 +2894,8 @@ static inline void cfs_rq_util_change(st
> *
> * See cpu_util().
> */
> - cpufreq_update_util(rq_clock(rq),
> - min(cfs_rq->avg.util_avg, max), max);
> + if (cpu_of(rq) == smp_processor_id())
Isn't this test against smp_processor_id() redundant since
this_rq()->cfs == cfs_rq?
> + cpufreq_update_util(rq_clock(rq), 0);
All else looked good to me.
thanks,
Steve
next prev parent reply other threads:[~2016-08-11 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 0:43 [PATCH 0/2] cpufreq / sched: Rework of cpufreq_update_util() arguments Rafael J. Wysocki
2016-08-10 1:09 ` [PATCH 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() Rafael J. Wysocki
2016-08-10 1:49 ` [Update][PATCH " Rafael J. Wysocki
2016-08-11 18:03 ` Steve Muckle [this message]
2016-08-11 18:05 ` Steve Muckle
2016-08-10 1:11 ` [PATCH 2/2] cpufreq / sched: Check cpu_of(rq) in cpufreq_update_util() Rafael J. Wysocki
2016-08-11 22:34 ` Steve Muckle
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=20160811180347.GB14324@graphite.smuckle.net \
--to=steve.muckle@linaro.org \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@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