Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677289 > unrolled thread

[PATCH 0/2] cpufreq: intel_pstate: Cleanups after recent changes

Started by"Rafael J. Wysocki" <rjw@rjwysocki.net>
First post2017-06-29 02:30 +0200
Last post2017-06-29 23:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] cpufreq: intel_pstate: Cleanups after recent changes "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-29 02:30 +0200
    [PATCH 1/2] cpufreq: intel_pstate: Clean up after performance governor changes "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-29 02:30 +0200
      Re: [PATCH 1/2] cpufreq: intel_pstate: Clean up after performance  governor changes Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-06-29 23:20 +0200

#1677289 — [PATCH 0/2] cpufreq: intel_pstate: Cleanups after recent changes

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2017-06-29 02:30 +0200
Subject[PATCH 0/2] cpufreq: intel_pstate: Cleanups after recent changes
Message-ID<tXvvl-rh-17@gated-at.bofh.it>
Hi,

The following two patches clean up intel_pstate and cpufreq documentation after
changes currently queued up in linux-next.

Thanks,
Rafael

[toc] | [next] | [standalone]


#1677295 — [PATCH 1/2] cpufreq: intel_pstate: Clean up after performance governor changes

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2017-06-29 02:30 +0200
Subject[PATCH 1/2] cpufreq: intel_pstate: Clean up after performance governor changes
Message-ID<tXvvm-rh-41@gated-at.bofh.it>
In reply to#1677289
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in
"performance" mode) get_target_pstate_use_performance() and
get_target_pstate_use_cpu_load() are never called if scaling_governor
is "performance", so drop the CPUFREQ_POLICY_PERFORMANCE checks from
them as they will never trigger anyway.

Moreover, the documentation needs to be updated to reflect the change
made by the above commit, so do that too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 Documentation/admin-guide/pm/intel_pstate.rst |    6 ++----
 drivers/cpufreq/intel_pstate.c                |    6 ------
 2 files changed, 2 insertions(+), 10 deletions(-)

Index: linux-pm/drivers/cpufreq/intel_pstate.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/intel_pstate.c
+++ linux-pm/drivers/cpufreq/intel_pstate.c
@@ -1612,9 +1612,6 @@ static inline int32_t get_target_pstate_
 	int32_t busy_frac, boost;
 	int target, avg_pstate;
 
-	if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
-		return cpu->pstate.turbo_pstate;
-
 	busy_frac = div_fp(sample->mperf, sample->tsc);
 
 	boost = cpu->iowait_boost;
@@ -1651,9 +1648,6 @@ static inline int32_t get_target_pstate_
 	int32_t perf_scaled, max_pstate, current_pstate, sample_ratio;
 	u64 duration_ns;
 
-	if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
-		return cpu->pstate.turbo_pstate;
-
 	/*
 	 * perf_scaled is the ratio of the average P-state during the last
 	 * sampling period to the P-state requested last time (in percent).
Index: linux-pm/Documentation/admin-guide/pm/intel_pstate.rst
===================================================================
--- linux-pm.orig/Documentation/admin-guide/pm/intel_pstate.rst
+++ linux-pm/Documentation/admin-guide/pm/intel_pstate.rst
@@ -157,10 +157,8 @@ Without HWP, this P-state selection algo
 the processor model and platform configuration.
 
 It selects the maximum P-state it is allowed to use, subject to limits set via
-``sysfs``, every time the P-state selection computations are carried out by the
-driver's utilization update callback for the given CPU (that does not happen
-more often than every 10 ms), but the hardware configuration will not be changed
-if the new P-state is the same as the current one.
+``sysfs``, every time the driver configuration for the given CPU is updated
+(e.g. via ``sysfs``).
 
 This is the default P-state selection algorithm if the
 :c:macro:`CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE` kernel configuration option

[toc] | [prev] | [next] | [standalone]


#1678205 — Re: [PATCH 1/2] cpufreq: intel_pstate: Clean up after performance governor changes

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2017-06-29 23:20 +0200
SubjectRe: [PATCH 1/2] cpufreq: intel_pstate: Clean up after performance governor changes
Message-ID<tXP0Z-4yl-9@gated-at.bofh.it>
In reply to#1677295
On Thu, 2017-06-29 at 01:47 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in
> "performance" mode) get_target_pstate_use_performance() and
> get_target_pstate_use_cpu_load() are never called if scaling_governor
> is "performance", so drop the CPUFREQ_POLICY_PERFORMANCE checks from
> them as they will never trigger anyway.
> 
> Moreover, the documentation needs to be updated to reflect the change
> made by the above commit, so do that too.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  Documentation/admin-guide/pm/intel_pstate.rst |    6 ++----
>  drivers/cpufreq/intel_pstate.c                |    6 ------
>  2 files changed, 2 insertions(+), 10 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/intel_pstate.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/intel_pstate.c
> +++ linux-pm/drivers/cpufreq/intel_pstate.c
> @@ -1612,9 +1612,6 @@ static inline int32_t get_target_pstate_
>  	int32_t busy_frac, boost;
>  	int target, avg_pstate;
>  
> -	if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
> -		return cpu->pstate.turbo_pstate;
> -
>  	busy_frac = div_fp(sample->mperf, sample->tsc);
>  
>  	boost = cpu->iowait_boost;
> @@ -1651,9 +1648,6 @@ static inline int32_t get_target_pstate_
>  	int32_t perf_scaled, max_pstate, current_pstate,
> sample_ratio;
>  	u64 duration_ns;
>  
> -	if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
> -		return cpu->pstate.turbo_pstate;
> -
>  	/*
>  	 * perf_scaled is the ratio of the average P-state during
> the last
>  	 * sampling period to the P-state requested last time (in
> percent).
> Index: linux-pm/Documentation/admin-guide/pm/intel_pstate.rst
> ===================================================================
> --- linux-pm.orig/Documentation/admin-guide/pm/intel_pstate.rst
> +++ linux-pm/Documentation/admin-guide/pm/intel_pstate.rst
> @@ -157,10 +157,8 @@ Without HWP, this P-state selection algo
>  the processor model and platform configuration.
>  
>  It selects the maximum P-state it is allowed to use, subject to
> limits set via
> -``sysfs``, every time the P-state selection computations are carried
> out by the
> -driver's utilization update callback for the given CPU (that does
> not happen
> -more often than every 10 ms), but the hardware configuration will
> not be changed
> -if the new P-state is the same as the current one.
> +``sysfs``, every time the driver configuration for the given CPU is
> updated
> +(e.g. via ``sysfs``).
>  
>  This is the default P-state selection algorithm if the
>  :c:macro:`CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE` kernel
> configuration option
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web