[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180907214047.26914-39-jschoenh@amazon.de>
Date: Fri, 7 Sep 2018 23:40:25 +0200
From: Jan H. Schönherr <jschoenh@...zon.de>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Jan H. Schönherr <jschoenh@...zon.de>,
linux-kernel@...r.kernel.org
Subject: [RFC 38/60] cosched: Skip updates on non-CPU runqueues in cfs_rq_util_change()
The function cfs_rq_util_change() notifies frequency governors of
utilization changes, so that they can be scheduler driven. This is
coupled to per CPU runqueue statistics. So, don't do anything
when called for non-CPU runqueues.
Signed-off-by: Jan H. Schönherr <jschoenh@...zon.de>
---
kernel/sched/fair.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a2945355f823..33e3f759eb99 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3015,7 +3015,16 @@ static inline void update_cfs_group(struct sched_entity *se)
static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq, int flags)
{
- struct rq *rq = rq_of(cfs_rq);
+ struct rq *rq = hrq_of(cfs_rq);
+
+#ifdef CONFIG_COSCHEDULING
+ /*
+ * This function is currently only well defined for per-CPU
+ * runqueues. Don't execute it for anything else.
+ */
+ if (rq->sdrq_data.level)
+ return;
+#endif
if (&rq->cfs == cfs_rq || (flags & SCHED_CPUFREQ_MIGRATION)) {
/*
--
2.9.3.1.gcba166c.dirty
Powered by blists - more mailing lists