Re: [PATCH] cpufreq: intel_pstate: Drop boost_iowait flag

From: Srinivas Pandruvada
Date: Fri Oct 21 2016 - 11:11:30 EST


On Wed, 2016-10-19 at 02:53 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> The "IOwait boosting" mechanism is only used by the
> get_target_pstate_use_cpu_load() governor function and the
> boost_iowait flag in pid_params is always set when that function
> is in use (and it is never set otherwise).ÂÂThis means that the
> boost_iowait flag is in fact redundant and may be dropped.
>
> For this reason, replace the boost_iowait flag check in
> intel_pstate_update_util() with an equivalent check against
> pstate_funcs.get_target_pstate and drop that flag.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>

> ---
> Âdrivers/cpufreq/intel_pstate.c |ÂÂÂÂ7 +------
> Â1 file changed, 1 insertion(+), 6 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/intel_pstate.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/intel_pstate.c
> +++ linux-pm/drivers/cpufreq/intel_pstate.c
> @@ -233,7 +233,6 @@ static struct cpudata **all_cpu_data;
> Â * @p_gain_pct: PID proportional gain
> Â * @i_gain_pct: PID integral gain
> Â * @d_gain_pct: PID derivative gain
> - * @boost_iowait: Whether or not to use iowait boosting.
> Â *
> Â * Stores per CPU model static PID configuration data.
> Â */
> @@ -245,7 +244,6 @@ struct pstate_adjust_policy {
> Â int p_gain_pct;
> Â int d_gain_pct;
> Â int i_gain_pct;
> - bool boost_iowait;
> Â};
> Â
> Â/**
> @@ -1043,7 +1041,6 @@ static const struct cpu_defaults silverm
> Â .p_gain_pct = 14,
> Â .d_gain_pct = 0,
> Â .i_gain_pct = 4,
> - .boost_iowait = true,
> Â },
> Â .funcs = {
> Â .get_max = atom_get_max_pstate,
> @@ -1065,7 +1062,6 @@ static const struct cpu_defaults airmont
> Â .p_gain_pct = 14,
> Â .d_gain_pct = 0,
> Â .i_gain_pct = 4,
> - .boost_iowait = true,
> Â },
> Â .funcs = {
> Â .get_max = atom_get_max_pstate,
> @@ -1107,7 +1103,6 @@ static const struct cpu_defaults bxt_par
> Â .p_gain_pct = 14,
> Â .d_gain_pct = 0,
> Â .i_gain_pct = 4,
> - .boost_iowait = true,
> Â },
> Â .funcs = {
> Â .get_max = core_get_max_pstate,
> @@ -1346,7 +1341,7 @@ static void intel_pstate_update_util(str
> Â struct cpudata *cpu = container_of(data, struct cpudata,
> update_util);
> Â u64 delta_ns;
> Â
> - if (pid_params.boost_iowait) {
> + if (pstate_funcs.get_target_pstate ==
> get_target_pstate_use_cpu_load) {
> Â if (flags & SCHED_CPUFREQ_IOWAIT) {
> Â cpu->iowait_boost = int_tofp(1);
> Â } else if (cpu->iowait_boost) {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info atÂÂhttp://vger.kernel.org/majordomo-info.html