2024-12-10 06:44:25 +03:00
|
|
|
From 48c8812a4cea0190a037757589443f3103c610ba Mon Sep 17 00:00:00 2001
|
2024-10-29 05:12:06 +03:00
|
|
|
From: Steven Barrett <steven@liquorix.net>
|
|
|
|
Date: Wed, 15 Jan 2020 20:43:56 -0600
|
|
|
|
Subject: 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(+)
|
|
|
|
|
|
|
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
|
|
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
2024-12-10 06:44:25 +03:00
|
|
|
@@ -2254,6 +2254,9 @@
|
2024-10-29 05:12:06 +03:00
|
|
|
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
|
|
|
|
active
|
|
|
|
Use intel_pstate driver to bypass the scaling
|
|
|
|
governors layer of cpufreq and provides it own
|
|
|
|
--- a/drivers/cpufreq/intel_pstate.c
|
|
|
|
+++ b/drivers/cpufreq/intel_pstate.c
|
2024-12-10 06:44:25 +03:00
|
|
|
@@ -3817,6 +3817,8 @@ static int __init intel_pstate_setup(cha
|
2024-10-29 05:12:06 +03:00
|
|
|
|
|
|
|
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"))
|