lkml.org 
[lkml]   [2018]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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)
> +{
> + if (!hwp_boost_threshold_busy_pct) {
> + int min_freq, max_freq;
> +
> + min_freq = cpu->pstate.min_pstate * cpu->pstate.scaling;
> + update_turbo_state();
> + max_freq = global.turbo_disabled || global.no_turbo ?
> + cpu->pstate.max_freq : cpu->pstate.turbo_freq;
> +
> + /*
> + * We are guranteed to get atleast min P-state.

If we assume
> + * P-state is proportional to load (such that 10% load
> + * increase will result in 10% P-state increase),

we will
> + * get at least min P-state till we have atleast
> + * (min * 100/max) percent cpu load.

turbo makes that story less clear ofcourse.

So any load less than
> + * than this this we shouldn't do any boost. Then boosting
> + * is not free, we will add atleast 20% offset.

This I don't get.. so you want to remain at min P longer?

> + */
> + hwp_boost_threshold_busy_pct = min_freq * 100 / max_freq;
> + hwp_boost_threshold_busy_pct += 20;
> + pr_debug("hwp_boost_threshold_busy_pct = %d\n",
> + hwp_boost_threshold_busy_pct);
> + }
> +}

And then this part should go in the previous patch.


\
 
 \ /
  Last update: 2018-05-16 09:48    [W:0.262 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site