public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Do not override performance EPB MSR value on servers
@ 2019-04-08  8:46 Thomas Renninger
  2019-04-08  8:51 ` Thomas Renninger
  2019-04-16 21:31 ` Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Renninger @ 2019-04-08  8:46 UTC (permalink / raw)
  To: Rafael Wysocki; +Cc: linux-pm

It is about this kernel message showing up on quite a lot servers:
[    0.072652] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.076003] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)

With this patch the EPB value is not overridden anymore on systems
which expose themselves as appliance or enterprise server via ACPI
perferred profile variable.

Signed-off-by: trenn@suse.de


Index: perf_bias_acpi_server_only/arch/x86/kernel/cpu/intel_epb.c
===================================================================
--- perf_bias_acpi_server_only.orig/arch/x86/kernel/cpu/intel_epb.c	2019-04-05 14:43:04.280222577 +0200
+++ perf_bias_acpi_server_only/arch/x86/kernel/cpu/intel_epb.c	2019-04-08 10:01:26.029278425 +0200
@@ -19,6 +19,8 @@
 #include <asm/cpufeature.h>
 #include <asm/msr.h>
 
+#include <linux/acpi.h>
+
 /**
  * DOC: overview
  *
@@ -89,7 +91,10 @@ static void intel_epb_restore(void)
 		 * ('normal').
 		 */
 		val = epb & EPB_MASK;
-		if (val == ENERGY_PERF_BIAS_PERFORMANCE) {
+		if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
+		    acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER) {
+			/* Keep performance setting on servers */
+		} else	if (val == ENERGY_PERF_BIAS_PERFORMANCE) {
 			val = ENERGY_PERF_BIAS_NORMAL;
 			pr_warn_once("ENERGY_PERF_BIAS: Set to 'normal', was 'performance'\n");
 		}


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-16 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08  8:46 [PATCH] x86: Do not override performance EPB MSR value on servers Thomas Renninger
2019-04-08  8:51 ` Thomas Renninger
2019-04-16 21:31 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox