tesla-dev-bounces at opensolaris.org wrote:

> Aubrey Li wrote:
>> [snip]
>>>> That is the behavior in the original linux implementation.
>>>> Actually there is a mechanism to auto-adjust the ticktime, but it
>>>> has been removed to powertop prototype quickly delivered, it would
>>>> be great if it can be recovered. Think about the future tickless
>>>> kernel, the cpu wakeup times become less, making the ticktime
>>>> longer makes more sense if the wakeup events is few in the current
>>>> sampling period. 
>>> So you mean adapting the interval based on the amount of wakeups -
>>> i.e few wakeups, higher interval and vice-versa ?
>>> 
>>> I'll have a look at the original code.
>>> 
>> That would be great, thanks, :-)
> 
> Ok, the Linux version sets maxsleep (below) to the duration of
> the last
> transition and then sets the interval according to
> 
>               if (maxsleep < 5.0)
>                       ticktime = 10;
>               else if (maxsleep < 30.0)
>                       ticktime = 15;
>               else if (maxsleep < 100.0)
>                       ticktime = 20;
>               else if (maxsleep < 400.0)
>                       ticktime = 30;
>               else
>                       ticktime = 45;
> 
> 
> There's also
> 
>               if (wakeups_per_second < 0)
>                       ticktime = 2;
> 
> How about adding this functionality as the default option, and fixing
> the interval if -t is used ? 
> 
Sounds great to me.

Thanks,
-Aubrey

Reply via email to