Re: powerd(8)

From: Bruno Ducrot <ducrot_at_poupinou.org>
Date: Mon, 18 Apr 2005 16:01:17 +0200
On Mon, Apr 18, 2005 at 02:19:14PM +0200, Poul-Henning Kamp wrote:
> In message <4263A33A.3030201_at_centtech.com>, Eric Anderson writes:
> >Lukas Ertl wrote:
> >
> >There's been some discussion on the -mobile list (I believe) about
> >this kind of thing before.  I think powerd is currently running with
> >a 'best shot' configuration, and I'm pretty sure that if anyone has 
> >a better algorithm in a patch form for people to try, I'm certain the 
> >good people with commit bits would easily commit a patched better version.
> 
> I don't think a proportional approach will work in this case, the steps
> are too far apart.
> 
> I also think the switch to full speed is wrong.  Such see-saw
> algorithms waste far too much time decaying.  A less steep flank
> should be used.

The full speed thing is right in almost case.  When we ran the processor
at lower speed, then we loose somehow the runpercent if running
at full speed at previous window.
Suppose for example we have those normalized performance
states: 100% 66% 50%
If we ran at 50% but read a 100% runpercent, then if we were running
at full speed, we would got a 50% runpercent which is given by
(runpercent * normalized_speed).  Those far, we can only say actually
that runpercent (at full speed) is in-between 50% and 100%.  If, for
example, the real runpercent (at full speed) is actually 50%,
then we should stay at 50%, if its at 66%, we should set speed at 66%
and so on.  But we can only estimate a value of 50% in all cases.

Therefore almost all algorithms will put the processor at full speed
if an increase is detected.
This work pretty well when the polling intervall is small
(something between 40 or 50 milliseconds).
In the case of powerd, the real trouble is maybe the polling interval
and we should use an adaptive filter in order to fix this issue.

The case when we detect to go down is less problematic because we are
able to compute at least an accurate estimation of runpercent for
the previous window.

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
Received on Mon Apr 18 2005 - 12:01:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:32 UTC