summarylogtreecommitdiffstats
path: root/0011-ZEN-intel-pstate-Implement-enable-parameter.patch
diff options
context:
space:
mode:
Diffstat (limited to '0011-ZEN-intel-pstate-Implement-enable-parameter.patch')
-rw-r--r--0011-ZEN-intel-pstate-Implement-enable-parameter.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/0011-ZEN-intel-pstate-Implement-enable-parameter.patch b/0011-ZEN-intel-pstate-Implement-enable-parameter.patch
new file mode 100644
index 000000000000..8b70b48959c5
--- /dev/null
+++ b/0011-ZEN-intel-pstate-Implement-enable-parameter.patch
@@ -0,0 +1,60 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Steven Barrett <steven@liquorix.net>
+Date: Wed, 15 Jan 2020 20:43:56 -0600
+Subject: [PATCH] ZEN: intel-pstate: Implement "enable" parameter
+
+If intel-pstate is compiled into the kernel, it will preempt the loading
+of acpi-cpufreq so you can take advantage of hardware p-states without
+any friction.
+
+However, intel-pstate is not completely superior to cpufreq's ondemand
+for one reason. There's no concept of an up_threshold property.
+
+In ondemand, up_threshold essentially reduces the maximum utilization to
+compare against, allowing you to hit max frequencies and turbo boost
+from a much lower core utilization.
+
+With intel-pstate, you have the concept of minimum and maximum
+performance, but no tunable that lets you define, maximum frequency
+means 50% core utilization. For just this oversight, there's reasons
+you may want ondemand.
+
+Lets support setting "enable" in kernel boot parameters. This lets
+kernel maintainers include "intel_pstate=disable" statically in the
+static boot parameters, but let users of the kernel override this
+selection.
+---
+ Documentation/admin-guide/kernel-parameters.txt | 3 +++
+ drivers/cpufreq/intel_pstate.c | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
+index 7123524a86b8..ac333f71ad29 100644
+--- a/Documentation/admin-guide/kernel-parameters.txt
++++ b/Documentation/admin-guide/kernel-parameters.txt
+@@ -1999,6 +1999,9 @@
+ disable
+ Do not enable intel_pstate as the default
+ scaling driver for the supported processors
++ enable
++ Enable intel_pstate in-case "disable" was passed
++ previously in the kernel boot parameters
+ passive
+ Use intel_pstate as a scaling driver, but configure it
+ to work with generic cpufreq governors (instead of
+diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
+index bc7f7e6759bd..a8c3779e1857 100644
+--- a/drivers/cpufreq/intel_pstate.c
++++ b/drivers/cpufreq/intel_pstate.c
+@@ -3512,6 +3512,8 @@ static int __init intel_pstate_setup(char *str)
+
+ if (!strcmp(str, "disable"))
+ no_load = 1;
++ else if (!strcmp(str, "enable"))
++ no_load = 0;
+ else if (!strcmp(str, "active"))
+ default_driver = &intel_pstate;
+ else if (!strcmp(str, "passive"))
+--
+2.35.1
+