[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180516074304.GX12217@hirez.programming.kicks-ass.net>
Date: Wed, 16 May 2018 09:43:04 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...e.de, lenb@...nel.org,
rjw@...ysocki.net, mgorman@...hsingularity.net, x86@...nel.org,
linux-pm@...r.kernel.org, viresh.kumar@...aro.org,
juri.lelli@....com, linux-kernel@...r.kernel.org
Subject: Re: [RFC/RFT] [PATCH 08/10] cpufreq: intel_pstate: Dyanmically
update busy pct
On Tue, May 15, 2018 at 09:49:09PM -0700, Srinivas Pandruvada wrote:
> +static inline void intel_pstate_update_busy_threshold(struct cpudata *cpu)
> +{
> + /* P1 percent out of total range of P-states */
> + if (cpu->pstate.max_freq != cpu->pstate.turbo_freq) {
> + hwp_boost_pstate_threshold =
> + cpu->pstate.max_freq * SCHED_CAPACITY_SCALE / cpu->pstate.turbo_freq;
> + pr_debug("hwp_boost_pstate_threshold = %d\n",
> + hwp_boost_pstate_threshold);
> + }
> +
> +}
> +
> static inline void intel_pstate_update_util_hwp(struct update_util_data *data,
> u64 time, unsigned int flags)
> {
> @@ -2061,8 +2097,10 @@ static int __intel_pstate_cpu_init(struct cpufreq_policy *policy)
>
> policy->fast_switch_possible = true;
>
> - if (hwp_active)
> + if (hwp_active) {
> csd_init(cpu);
> + intel_pstate_update_busy_threshold(cpu);
> + }
>
> return 0;
> }
This should go in patch #5 and then you can remove that SKX hack. Which
you left in, even though you now did it right.
Powered by blists - more mailing lists