]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Nov 2014 04:05:25 +0000 (13:05 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Nov 2014 04:05:25 +0000 (13:05 +0900)
added patches:
cpufreq-intel_pstate-fix-setting-max_perf_pct-in-performance-policy.patch

queue-3.10/cpufreq-intel_pstate-fix-setting-max_perf_pct-in-performance-policy.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/cpufreq-intel_pstate-fix-setting-max_perf_pct-in-performance-policy.patch b/queue-3.10/cpufreq-intel_pstate-fix-setting-max_perf_pct-in-performance-policy.patch
new file mode 100644 (file)
index 0000000..ee6a7b3
--- /dev/null
@@ -0,0 +1,76 @@
+From 36b4bed5cd8f6e17019fa7d380e0836872c7b367 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
+Date: Thu, 16 Oct 2014 01:16:51 +0200
+Subject: cpufreq: intel_pstate: Fix setting max_perf_pct in performance policy
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
+
+commit 36b4bed5cd8f6e17019fa7d380e0836872c7b367 upstream.
+
+Code which changes policy to powersave changes also max_policy_pct based on
+max_freq. Code which change max_perf_pct has upper limit base on value
+max_policy_pct. When policy is changing from powersave back to performance
+then max_policy_pct is not changed. Which means that changing max_perf_pct is
+not possible to high values if max_freq was too low in powersave policy.
+
+Test case:
+
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+800000
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+3300000
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+performance
+$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
+100
+
+$ echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+$ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+$ echo 20 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
+
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+powersave
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+800000
+$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
+20
+
+$ echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+$ echo 3300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+$ echo 100 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
+
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+performance
+$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+3300000
+$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
+24
+
+And now intel_pstate driver allows to set maximal value for max_perf_pct based
+on max_policy_pct which is 24 for previous powersave max_freq 800000.
+
+This patch will set default value for max_policy_pct when setting policy to
+performance so it will allow to set also max value for max_perf_pct.
+
+Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
+Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpufreq/intel_pstate.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/cpufreq/intel_pstate.c
++++ b/drivers/cpufreq/intel_pstate.c
+@@ -599,6 +599,7 @@ static int intel_pstate_set_policy(struc
+       if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
+               limits.min_perf_pct = 100;
+               limits.min_perf = int_tofp(1);
++              limits.max_policy_pct = 100;
+               limits.max_perf_pct = 100;
+               limits.max_perf = int_tofp(1);
+               limits.no_turbo = 0;
index 3770e3741536586b3200060c435ed86473527770..b70b9d3332891309046dabbdd8fed43ad9b1f491 100644 (file)
@@ -69,4 +69,5 @@ ext4-add-ext4_iget_normal-which-is-to-be-used-for-dir-tree-lookups.patch
 ext4-fix-reservation-overflow-in-ext4_da_write_begin.patch
 ext4-check-s_chksum_driver-when-looking-for-bg-csum-presence.patch
 ext4-fix-overflow-when-updating-superblock-backups-after-resize.patch
+cpufreq-intel_pstate-fix-setting-max_perf_pct-in-performance-policy.patch
 ext4-fix-oops-when-loading-block-bitmap-failed.patch