Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1595973
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC 9/9] sched: cpufreq: enable remote sched cpufreq callbacks |
| Date | 2017-03-09 12:50 +0100 |
| Message-ID | <tj4JY-4BF-43@gated-at.bofh.it> (permalink) |
| References | <tj4JX-4BF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Steve Muckle <smuckle.linux@gmail.com>
Now that all clients properly support (or ignore) remote scheduler
cpufreq callbacks, remove the restriction that such callbacks only be
made in CFS on the local CPU.
Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/sched/fair.c | 6 ++++--
kernel/sched/sched.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3e88b35ac157..12db77814814 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3188,7 +3188,9 @@ static inline void set_tg_cfs_propagate(struct cfs_rq *cfs_rq) {}
static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq)
{
- if (&this_rq()->cfs == cfs_rq) {
+ struct rq *rq = rq_of(cfs_rq);
+
+ if (&rq->cfs == cfs_rq) {
/*
* There are a few boundary cases this might miss but it should
* get called often enough that that should (hopefully) not be
@@ -3205,7 +3207,7 @@ static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq)
*
* See cpu_util().
*/
- cpufreq_update_util(rq_of(cfs_rq), 0);
+ cpufreq_update_util(rq, 0);
}
}
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 5cbf92214ad8..30c71fc3e02e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1921,7 +1921,8 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
{
struct update_util_data *data;
- data = rcu_dereference_sched(*this_cpu_ptr(&cpufreq_update_util_data));
+ data = rcu_dereference_sched(*per_cpu_ptr(&cpufreq_update_util_data,
+ cpu_of(rq)));
if (data)
data->func(data, rq_clock(rq), flags);
}
--
2.7.1.410.g6faf27b
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC 0/9] cpufreq: schedutil: Allow remote wakeups Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100 [RFC 2/9] irq_work: add irq_work_queue_on for !CONFIG_SMP Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100 [RFC 3/9] cpufreq: Add dvfs_possible_from_any_cpu policy flag Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100 [RFC 6/9] sched: cpufreq: detect, process remote callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100 [RFC 7/9] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100 [RFC 9/9] sched: cpufreq: enable remote sched cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-09 12:50 +0100
csiph-web