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.


Reply via email to