linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms
  2018-07-30 22:00 [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms Srinivas Pandruvada
@ 2018-07-30 21:50 ` Francisco Jerez
  2018-07-31  8:03 ` Mel Gorman
  2018-07-31  9:18 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Francisco Jerez @ 2018-07-30 21:50 UTC (permalink / raw)
  To: Srinivas Pandruvada, lenb, rjw, viresh.kumar
  Cc: linux-pm, linux-kernel, eero.t.tamminen, ggherdovich, mgorman,
	Srinivas Pandruvada, Chris Wilson


[-- Attachment #1.1: Type: text/plain, Size: 2923 bytes --]

Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> writes:

> Dynamic boosting of HWP performance on IO wake showed significant
> improvement to IO workloads. This series was intended for Skylake Xeon
> platforms only and feature was enabled by default based on CPU model
> number.
>
> But some Xeon platforms reused the Skylake desktop CPU model number. This
> caused some undesirable side effects to some graphics workloads. Since
> they are heavily IO bound, the increase in CPU performance decreased the
> power available for GPU to do its computing and hence decrease in graphics
> benchmark performance.
>
> For example on a Skylake desktop, GpuTest benchmark showed average FPS
> reduction from 529 to 506.
>
> This change makes sure that HWP boost feature is only enabled for Skylake
> server platforms by using ACPI FADT preferred PM Profile. If some desktop
> users wants to get benefit of boost, they can still enable boost from
> intel_pstate sysfs attribute "hwp_dynamic_boost".
>
> Fixes: 41ab43c9c89e (cpufreq: intel_pstate: enable boost for Skylake Xeon)
> Link: https://bugs.freedesktop.org/show_bug.cgi?id=107410
> Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Reviewed-by: Francisco Jerez <currojerez@riseup.net>

> ---
>  drivers/cpufreq/intel_pstate.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 3c3971256130..d4ed0022b0dd 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -311,12 +311,20 @@ static DEFINE_MUTEX(intel_pstate_limits_lock);
>  
>  #ifdef CONFIG_ACPI
>  
> -static bool intel_pstate_get_ppc_enable_status(void)
> +static bool intel_pstate_acpi_pm_profile_server(void)
>  {
>  	if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
>  	    acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
>  		return true;
>  
> +	return false;
> +}
> +
> +static bool intel_pstate_get_ppc_enable_status(void)
> +{
> +	if (intel_pstate_acpi_pm_profile_server())
> +		return true;
> +
>  	return acpi_ppc;
>  }
>  
> @@ -459,6 +467,11 @@ static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *pol
>  static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
>  {
>  }
> +
> +static inline bool intel_pstate_acpi_pm_profile_server(void)
> +{
> +	return false;
> +}
>  #endif
>  
>  static inline void update_turbo_state(void)
> @@ -1841,7 +1854,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
>  		intel_pstate_hwp_enable(cpu);
>  
>  		id = x86_match_cpu(intel_pstate_hwp_boost_ids);
> -		if (id)
> +		if (id && intel_pstate_acpi_pm_profile_server())
>  			hwp_boost = true;
>  	}
>  
> -- 
> 2.17.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms
@ 2018-07-30 22:00 Srinivas Pandruvada
  2018-07-30 21:50 ` Francisco Jerez
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Srinivas Pandruvada @ 2018-07-30 22:00 UTC (permalink / raw)
  To: lenb, rjw, viresh.kumar
  Cc: linux-pm, linux-kernel, eero.t.tamminen, ggherdovich, mgorman,
	currojerez, Srinivas Pandruvada

Dynamic boosting of HWP performance on IO wake showed significant
improvement to IO workloads. This series was intended for Skylake Xeon
platforms only and feature was enabled by default based on CPU model
number.

But some Xeon platforms reused the Skylake desktop CPU model number. This
caused some undesirable side effects to some graphics workloads. Since
they are heavily IO bound, the increase in CPU performance decreased the
power available for GPU to do its computing and hence decrease in graphics
benchmark performance.

For example on a Skylake desktop, GpuTest benchmark showed average FPS
reduction from 529 to 506.

This change makes sure that HWP boost feature is only enabled for Skylake
server platforms by using ACPI FADT preferred PM Profile. If some desktop
users wants to get benefit of boost, they can still enable boost from
intel_pstate sysfs attribute "hwp_dynamic_boost".

Fixes: 41ab43c9c89e (cpufreq: intel_pstate: enable boost for Skylake Xeon)
Link: https://bugs.freedesktop.org/show_bug.cgi?id=107410
Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/cpufreq/intel_pstate.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 3c3971256130..d4ed0022b0dd 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -311,12 +311,20 @@ static DEFINE_MUTEX(intel_pstate_limits_lock);
 
 #ifdef CONFIG_ACPI
 
-static bool intel_pstate_get_ppc_enable_status(void)
+static bool intel_pstate_acpi_pm_profile_server(void)
 {
 	if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
 	    acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
 		return true;
 
+	return false;
+}
+
+static bool intel_pstate_get_ppc_enable_status(void)
+{
+	if (intel_pstate_acpi_pm_profile_server())
+		return true;
+
 	return acpi_ppc;
 }
 
@@ -459,6 +467,11 @@ static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *pol
 static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
 }
+
+static inline bool intel_pstate_acpi_pm_profile_server(void)
+{
+	return false;
+}
 #endif
 
 static inline void update_turbo_state(void)
@@ -1841,7 +1854,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
 		intel_pstate_hwp_enable(cpu);
 
 		id = x86_match_cpu(intel_pstate_hwp_boost_ids);
-		if (id)
+		if (id && intel_pstate_acpi_pm_profile_server())
 			hwp_boost = true;
 	}
 
-- 
2.17.1


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

* Re: [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms
  2018-07-30 22:00 [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms Srinivas Pandruvada
  2018-07-30 21:50 ` Francisco Jerez
@ 2018-07-31  8:03 ` Mel Gorman
  2018-07-31  9:18 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2018-07-31  8:03 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: lenb, rjw, viresh.kumar, linux-pm, linux-kernel, eero.t.tamminen,
	ggherdovich, currojerez

On Mon, Jul 30, 2018 at 03:00:29PM -0700, Srinivas Pandruvada wrote:
> Dynamic boosting of HWP performance on IO wake showed significant
> improvement to IO workloads. This series was intended for Skylake Xeon
> platforms only and feature was enabled by default based on CPU model
> number.
> 
> But some Xeon platforms reused the Skylake desktop CPU model number. This
> caused some undesirable side effects to some graphics workloads. Since
> they are heavily IO bound, the increase in CPU performance decreased the
> power available for GPU to do its computing and hence decrease in graphics
> benchmark performance.
> 
> For example on a Skylake desktop, GpuTest benchmark showed average FPS
> reduction from 529 to 506.
> 
> This change makes sure that HWP boost feature is only enabled for Skylake
> server platforms by using ACPI FADT preferred PM Profile. If some desktop
> users wants to get benefit of boost, they can still enable boost from
> intel_pstate sysfs attribute "hwp_dynamic_boost".
> 
> Fixes: 41ab43c9c89e (cpufreq: intel_pstate: enable boost for Skylake Xeon)
> Link: https://bugs.freedesktop.org/show_bug.cgi?id=107410
> Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs

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

* Re: [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms
  2018-07-30 22:00 [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms Srinivas Pandruvada
  2018-07-30 21:50 ` Francisco Jerez
  2018-07-31  8:03 ` Mel Gorman
@ 2018-07-31  9:18 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2018-07-31  9:18 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: lenb, viresh.kumar, linux-pm, linux-kernel, eero.t.tamminen,
	ggherdovich, mgorman, currojerez

On Tuesday, July 31, 2018 12:00:29 AM CEST Srinivas Pandruvada wrote:
> Dynamic boosting of HWP performance on IO wake showed significant
> improvement to IO workloads. This series was intended for Skylake Xeon
> platforms only and feature was enabled by default based on CPU model
> number.
> 
> But some Xeon platforms reused the Skylake desktop CPU model number. This
> caused some undesirable side effects to some graphics workloads. Since
> they are heavily IO bound, the increase in CPU performance decreased the
> power available for GPU to do its computing and hence decrease in graphics
> benchmark performance.
> 
> For example on a Skylake desktop, GpuTest benchmark showed average FPS
> reduction from 529 to 506.
> 
> This change makes sure that HWP boost feature is only enabled for Skylake
> server platforms by using ACPI FADT preferred PM Profile. If some desktop
> users wants to get benefit of boost, they can still enable boost from
> intel_pstate sysfs attribute "hwp_dynamic_boost".
> 
> Fixes: 41ab43c9c89e (cpufreq: intel_pstate: enable boost for Skylake Xeon)
> Link: https://bugs.freedesktop.org/show_bug.cgi?id=107410
> Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  drivers/cpufreq/intel_pstate.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 3c3971256130..d4ed0022b0dd 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -311,12 +311,20 @@ static DEFINE_MUTEX(intel_pstate_limits_lock);
>  
>  #ifdef CONFIG_ACPI
>  
> -static bool intel_pstate_get_ppc_enable_status(void)
> +static bool intel_pstate_acpi_pm_profile_server(void)
>  {
>  	if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
>  	    acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
>  		return true;
>  
> +	return false;
> +}
> +
> +static bool intel_pstate_get_ppc_enable_status(void)
> +{
> +	if (intel_pstate_acpi_pm_profile_server())
> +		return true;
> +
>  	return acpi_ppc;
>  }
>  
> @@ -459,6 +467,11 @@ static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *pol
>  static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
>  {
>  }
> +
> +static inline bool intel_pstate_acpi_pm_profile_server(void)
> +{
> +	return false;
> +}
>  #endif
>  
>  static inline void update_turbo_state(void)
> @@ -1841,7 +1854,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
>  		intel_pstate_hwp_enable(cpu);
>  
>  		id = x86_match_cpu(intel_pstate_hwp_boost_ids);
> -		if (id)
> +		if (id && intel_pstate_acpi_pm_profile_server())
>  			hwp_boost = true;
>  	}
>  
> 

Applied, thanks!



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

end of thread, other threads:[~2018-07-31  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 22:00 [PATCH] cpufreq: intel_pstate: Limit the scope of HWP dynamic boost platforms Srinivas Pandruvada
2018-07-30 21:50 ` Francisco Jerez
2018-07-31  8:03 ` Mel Gorman
2018-07-31  9:18 ` 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;
as well as URLs for NNTP newsgroup(s).