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 07:35:04 (+0000), Wang, Vincent (王争) wrote:
> Did you mean the value of arch_scale_cpu_capacity() is changed in
> cpu_capacity_store()?

Yes, there's that, but more importantly topology_normalize_cpu_scale()
is called during boot. With printks() in the relevant functions, the
boot log on my system with two CPUFreq policies looks like this:

[ 2.393085] init_cpu_capacity_callback: policy0
[ 2.397714] sugov_start: policy0
[ 2.403734] init_cpu_capacity_callback: policy1
[ 2.407901] topology_normalize_cpu_scale: done
[ 2.412581] sugov_start: policy1

So, the lack of order of sugov_start() and topology_normalize_cpu_scale()
is a problem, I think.

> If so, I can restart schedutil governor after new capacity is updated.

Hmm, that feels a bit overkill, but that should at least be a correct
way of updating sg_cpu->{min, max} in a non-racy way. And CPU capacity
changes are infrequent, so the overhead of re-starting the governor
isn't a major issue, I suppose.

You could also update the values in sugov_get_util() at the cost of a
small overhead to compute 'min'. I'm not sure what's preferable since
we wanted to avoid that kind of overhead in the first place ...

Thanks,
Quentin

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