From: "tip-bot for Rafael J. Wysocki" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org,
peterz@infradead.org, mingo@kernel.org,
rafael.j.wysocki@intel.com, tglx@linutronix.de,
linux-pm@vger.kernel.org, steve.muckle@linaro.org,
srinivas.pandruvada@linux.intel.com,
torvalds@linux-foundation.org, viresh.kumar@linaro.org
Subject: [tip:sched/urgent] sched/fair: Fix !CONFIG_SMP kernel cpufreq governor breakage
Date: Fri, 6 May 2016 23:37:46 -0700 [thread overview]
Message-ID: <tip-536bd00cdbb7b908573e5a93bae67b64cbae60d8@git.kernel.org> (raw)
In-Reply-To: <6282396.VVEdgVYxO3@vostro.rjw.lan>
Commit-ID: 536bd00cdbb7b908573e5a93bae67b64cbae60d8
Gitweb: http://git.kernel.org/tip/536bd00cdbb7b908573e5a93bae67b64cbae60d8
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
AuthorDate: Fri, 6 May 2016 14:58:43 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 7 May 2016 07:45:34 +0200
sched/fair: Fix !CONFIG_SMP kernel cpufreq governor breakage
The following commit:
34e2c555f3e1 ("cpufreq: Add mechanism for registering utilization update callbacks")
overlooked the fact that update_load_avg(), where CFS invokes cpufreq
utilization update callbacks, becomes an empty stub on UP kernels.
In consequence, if !CONFIG_SMP, cpufreq governors are never invoked
from CFS and they do not have a chance to evaluate CPU performace
levels and update them often enough.
Needless to say, things don't work as expected then.
Fix the problem by making the !CONFIG_SMP stub of update_load_avg()
invoke cpufreq update callbacks too.
Reported-by: Steve Muckle <steve.muckle@linaro.org>
Tested-by: Steve Muckle <steve.muckle@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Steve Muckle <steve.muckle@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Fixes: 34e2c555f3e1 (cpufreq: Add mechanism for registering utilization update callbacks)
Link: http://lkml.kernel.org/r/6282396.VVEdgVYxO3@vostro.rjw.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0fe30e6..40748dc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3030,7 +3030,14 @@ static int idle_balance(struct rq *this_rq);
#else /* CONFIG_SMP */
-static inline void update_load_avg(struct sched_entity *se, int update_tg) {}
+static inline void update_load_avg(struct sched_entity *se, int not_used)
+{
+ struct cfs_rq *cfs_rq = cfs_rq_of(se);
+ struct rq *rq = rq_of(cfs_rq);
+
+ cpufreq_trigger_update(rq_clock(rq));
+}
+
static inline void
enqueue_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {}
static inline void
prev parent reply other threads:[~2016-05-07 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 12:58 [PATCH] sched/fair: Invoke cpufreq hooks for CONFIG_SMP unset Rafael J. Wysocki
2016-05-06 19:08 ` Steve Muckle
2016-05-06 19:36 ` Rafael J. Wysocki
2016-05-07 6:13 ` Peter Zijlstra
2016-05-07 6:30 ` Ingo Molnar
2016-05-09 8:30 ` Peter Zijlstra
2016-05-09 23:53 ` Steve Muckle
2016-05-09 23:58 ` Rafael J. Wysocki
2016-05-10 8:13 ` Ingo Molnar
2016-05-07 6:37 ` tip-bot for Rafael J. Wysocki [this message]
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=tip-536bd00cdbb7b908573e5a93bae67b64cbae60d8@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=steve.muckle@linaro.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.