Skip to contentSkip to conversation

cpufreq: allow powersave governor as the default without expert mode

PATCH In review James Geboski 4 participants 6 messages Oct 14, 2014 – Nov 8, 2014 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: allow powersave governor as the default without expert mode

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

---
 drivers/cpufreq/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/Kconfig +0 -1
index 3489f8f..73df7db 100644
@@ -63,7 +63,6 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
 
 config CPU_FREQ_DEFAULT_GOV_POWERSAVE
 	bool "powersave"
-	depends on EXPERT
 	select CPU_FREQ_GOV_POWERSAVE
 	help
 	  Use the CPUFreq governor 'powersave' as default. This sets
Signature · 1 line
2.1.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · James Geboski

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

---
 drivers/cpufreq/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/Kconfig +0 -0
index 3489f8f..73df7db 100644

drivers/cpufreq/Kconfig config CPU_FREQ_DEFAULT_GOV_PERFORMANCE · line 68

Quoted 7 lines
drivers/cpufreq/Kconfig +0 -1
@@ -63,7 +63,6 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
 
 config CPU_FREQ_DEFAULT_GOV_POWERSAVE
        bool "powersave"
-       depends on EXPERT
        select CPU_FREQ_GOV_POWERSAVE
        help
          Use the CPUFreq governor 'powersave' as default. This sets

This was the commit which introduced it:

commit 30d221db4439973076953e2ed44344fa92d1d09f

Author: Alessandro Guido <[email protected]>
Date:   Fri Apr 18 13:31:13 2008 -0700

[CPUFREQ] allow use of the powersave governor as the default one

Allow use of the powersave cpufreq governor as the default one for EMBEDDED configs.

---
 drivers/cpufreq/Kconfig             | 9 +++++++++
 drivers/cpufreq/cpufreq_powersave.c | 8 ++++++--
 include/linux/cpufreq.h             | 3 +++
 3 files changed, 18 insertions(+), 2 deletions(-)
drivers/cpufreq/Kconfig +9 -0
index c159ae6..5f076ae 100644
@@ -69,6 +69,15 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
          the frequency statically to the highest frequency supported by
          the CPU.
 
+config CPU_FREQ_DEFAULT_GOV_POWERSAVE
+       bool "powersave"
+       depends on EMBEDDED
+       select CPU_FREQ_GOV_POWERSAVE
+       help
+         Use the CPUFreq governor 'powersave' as default. This sets
+         the frequency statically to the lowest frequency supported by
+         the CPU.
+
 
 
 

And I think it was wrong since ever, it should have been selected by EMBEDDED instead
of a depends here.

For your patch:

#2 lore raw

PATCH v2 1/1 cpufreq: allow powersave governor as the default without expert mode

In reply to James Geboski

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

---
ChangeLog v2:
- Acked-by: Viresh Kumar <[email protected]>

---
 drivers/cpufreq/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/Kconfig +0 -1
index 3489f8f..73df7db 100644
@@ -63,7 +63,6 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
 
 config CPU_FREQ_DEFAULT_GOV_POWERSAVE
 	bool "powersave"
-	depends on EXPERT
 	select CPU_FREQ_GOV_POWERSAVE
 	help
 	  Use the CPUFreq governor 'powersave' as default. This sets
Signature · 1 line
2.1.2
#3 lore raw
Quoted 9 lines · James Geboski

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

Quoted 7 lines

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

Dirk, any objections?

Quoted 20 lines

---
ChangeLog v2:
- Acked-by: Viresh Kumar <[email protected]>

---
 drivers/cpufreq/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/Kconfig +0 -1
index 3489f8f..73df7db 100644
@@ -63,7 +63,6 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
 
 config CPU_FREQ_DEFAULT_GOV_POWERSAVE
 	bool "powersave"
-	depends on EXPERT
 	select CPU_FREQ_GOV_POWERSAVE
 	help
 	  Use the CPUFreq governor 'powersave' as default. This sets
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#4 lore raw
Quoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · James Geboski

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

Quoted 4 lines
Quoted 2 lines

Dirk, any objections?

No objection.

Quoted 22 lines
Quoted 21 lines

---
ChangeLog v2:
- Acked-by: Viresh Kumar <[email protected]>

---
  drivers/cpufreq/Kconfig | 1 -
  1 file changed, 1 deletion(-)
drivers/cpufreq/Kconfig +0 -1
index 3489f8f..73df7db 100644
@@ -63,7 +63,6 @@ config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
 
  config CPU_FREQ_DEFAULT_GOV_POWERSAVE
  	bool "powersave"
-	depends on EXPERT
  	select CPU_FREQ_GOV_POWERSAVE
  	help
  	  Use the CPUFreq governor 'powersave' as default. This sets
#5 lore raw
Quoted 16 lines · Dirk Brandewie
Quoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · James Geboski

The intel_pstate driver only supports the performance and the powersave governors. With the performance governor ensuring the highest possible performance settings, userspace tools fail to make any lasting changes. In order to allow userspace tools to make modifications to the settings, the powersave governor must be in use. This makes having the powersave governor as the default convenient for systems where the intel_pstate driver is being employed. Having to enable expert mode in the kernel configuration is just a headache for such a trivial task.

This patch applies to all kernel versions 2.6.38 or greater after the migration from CONFIG_EMBEDDED to CONFIG_EXPERT (6a108a14fa35). Most importantly, this applies to kernel versions 3.9 or greater when the intel_pstate driver was introduced.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Dirk, any objections?

No objection.

OK, patch queued up for 3.19-rc1, thanks!

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.