From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, smuckle.linux@gmail.com,
juri.lelli@arm.com, Morten.Rasmussen@arm.com,
patrick.bellasi@arm.com, eas-dev@lists.linaro.org
Subject: [PATCH V2 2/4] cpufreq: governor: Process remote callback for shared policies
Date: Thu, 29 Jun 2017 10:56:31 +0530 [thread overview]
Message-ID: <e41df6731e29c46f69955b0432befd6db9242f0b.1498712046.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1498712046.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1498712046.git.viresh.kumar@linaro.org>
This patch updates the legacy governors (ondemand/conservative) to
process cpufreq utilization update hooks to be called for remote CPUs
(i.e. For updates to the runqueue of other non-local CPUs).
Based on initial work from Steve Muckle.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq_governor.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index 47e24b5384b3..0b49fc8bb91d 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -275,6 +275,10 @@ static void dbs_update_util_handler(struct update_util_data *data, u64 time,
struct policy_dbs_info *policy_dbs = cdbs->policy_dbs;
u64 delta_ns, lst;
+ /* Allow remote callbacks only on the CPUs sharing cpufreq policy */
+ if (!cpumask_test_cpu(smp_processor_id(), policy_dbs->policy->cpus))
+ return;
+
/*
* The work may not be allowed to be queued up right now.
* Possible reasons:
--
2.13.0.71.gd7076ec9c9cb
next prev parent reply other threads:[~2017-06-29 5:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 5:26 [PATCH V2 0/4] sched: cpufreq: Allow remote callbacks Viresh Kumar
2017-06-29 5:26 ` [PATCH V2 1/4] cpufreq: schedutil: Process remote callback for shared policies Viresh Kumar
2017-06-29 5:26 ` Viresh Kumar [this message]
2017-06-29 5:26 ` [PATCH V2 3/4] intel_pstate: Ignore scheduler cpufreq callbacks on remote CPUs Viresh Kumar
2017-06-29 21:23 ` Srinivas Pandruvada
2017-06-30 3:27 ` Viresh Kumar
2017-07-12 23:27 ` Rafael J. Wysocki
2017-06-29 5:26 ` [PATCH V2 4/4] sched: cpufreq: Enable remote sched cpufreq callbacks Viresh Kumar
2017-06-29 20:30 ` [PATCH V2 0/4] sched: cpufreq: Allow remote callbacks Rafael J. Wysocki
2017-06-30 3:24 ` Viresh Kumar
2017-07-12 23:22 ` Rafael J. Wysocki
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=e41df6731e29c46f69955b0432befd6db9242f0b.1498712046.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=Morten.Rasmussen@arm.com \
--cc=eas-dev@lists.linaro.org \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=smuckle.linux@gmail.com \
--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).