lkml.org 
[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 答复: [PATCH V4] sc hed/cpufreq: initializ e iowait_boost_max and iowait_boost with cpu capacity
On Monday 04 Mar 2019 at 18:40:28 (+0100), Peter Zijlstra wrote:
> > Perhaps you could keep the 'util' and 'max' pointers in
> > sugov_iowait_apply() and overwrite them like before, but in the
> > SCHED_CAPACITY_SCALE scale as you suggest ?
>
> Urgh; but then we're back to having that boostrap problem.

Hmm, I don't understand :/

> Now; at this time; @max is in fact scale_cpu_capacity, so can't we
> change this:
>
> - /*
> - * Apply the current boost value: a CPU is boosted only if its current
> - * utilization is smaller then the current IO boost level.
> - */
> - boost_util = sg_cpu->iowait_boost;
> - boost_max = sg_cpu->iowait_boost_max;

I was basically suggesting to do 'boost_max = 1024;' here and you
should be good with you way of computing 'min' no ?

> - if (*util * boost_max < *max * boost_util) {
> - *util = boost_util;
> - *max = boost_max;
> - }
> + sg_cpu->iowait_boost_pending = false;
> +
> + return min(max(util, sg_cpu->iowait_boost), max);
> }
>
> to something like:
>
> /*
> * @util is already in capacity scale, convert iowait_boost
> * into the same scale so we can compare.
> */
> boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT;
> util = max(boost, util);
> return min(util, max);
>

But this should work too, I think.

Thanks,
Quentin

\
 
 \ /
  Last update: 2019-03-04 18:51    [W:0.078 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site