On 2020-05-28, Solene Rapenne wrote:
> > > In the current case, if you have offline cpu (because of hw.smt=0),
> > > the total will still sum all the idle cpu and it's unlikely that
> > > the total threshold is ever reached before the per cpu one.
> > > 
> > > so, this diff skip offline cpus in the loop (robert@ gave me the big
> > > clue to use cpu_is_online in the loop)  

This looks good.

> 
> It's a lot of magic numbers without explanation here. I'm curious if
> this could be improved. I guess that changing them would tip the
> balance between responsiveness and battery saving.

Did I do that? You have it about right, although there was never much science
behind the algorithm or numbers. It was something that seemed to work okay
without much complexity.

Reply via email to