On Sat, 30 May 2020 08:42:59 -0600 (MDT)
Solene Rapenne <sol...@openbsd.org>:

> CVSROOT:      /cvs
> Module name:  src
> Changes by:   sol...@cvs.openbsd.org  2020/05/30 08:42:59
> 
> Modified files:
>       sys/kern       : sched_bsd.c 
> 
> Log message:
> In automatic performance mode on systems with offline CPUs because of
> SMT mitigation the algorithm was still accounting the offline CPUs,
> leading to a code path that would never be reached.
> 
> This should allow better frequency scaling on systems with many CPUs.
> The frequency should scale up if one of two condition is true.
> - if at least one CPU has less than 25% of idle cpu time
> - if the average of all idle time is under 33%
> 
> The second condition was never met because offline CPU are always
> accounted as 100% idle.
> 
> A bit more explanations about the auto scaling in case someone want
> to improve this later: When one condition is met, CPU frequency is
> set to maximum and a counter set to 5, then the function will be run
> again 100ms later and decrement the counter if both conditions are
> not met anymore. Once the counter reach 0 the frequency is set to
> minimum. This mean that it can take up to 100ms to scale up and up to
> 500ms to scale down.
> 
> ok brynet@
> looks good tedu@
> 

I forgot to credit claudio@ who shared the code to skip offline cpu

Reply via email to