lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-536bd00cdbb7b908573e5a93bae67b64cbae60d8@git.kernel.org>
Date:	Fri, 6 May 2016 23:37:46 -0700
From:	"tip-bot for Rafael J. Wysocki" <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	hpa@...or.com, linux-kernel@...r.kernel.org, peterz@...radead.org,
	mingo@...nel.org, rafael.j.wysocki@...el.com, tglx@...utronix.de,
	linux-pm@...r.kernel.org, steve.muckle@...aro.org,
	srinivas.pandruvada@...ux.intel.com, torvalds@...ux-foundation.org,
	viresh.kumar@...aro.org
Subject: [tip:sched/urgent] sched/fair: Fix !CONFIG_SMP kernel cpufreq
 governor breakage

Commit-ID:  536bd00cdbb7b908573e5a93bae67b64cbae60d8
Gitweb:     http://git.kernel.org/tip/536bd00cdbb7b908573e5a93bae67b64cbae60d8
Author:     Rafael J. Wysocki <rafael.j.wysocki@...el.com>
AuthorDate: Fri, 6 May 2016 14:58:43 +0200
Committer:  Ingo Molnar <mingo@...nel.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@...aro.org>
Tested-by: Steve Muckle <steve.muckle@...aro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Acked-by: Steve Muckle <steve.muckle@...aro.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Linux PM list <linux-pm@...r.kernel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Viresh Kumar <viresh.kumar@...aro.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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ