On 31/07/2015 19:12, Jason J. Herne wrote:
>>
>>
> 
> Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how
> throttle_ratio is used in the calculation:
> 
> long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE);
> 
> A value of 1 means we sleep the same amount of time that we execute.

But that doesn't work if your timer runs every CPU_THROTTLE_TIMESLICE
milliseconds, and thus schedules async work every CPU_THROTTLE_TIMESLICE
milliseconds.

The timer would have to be scheduled every (throttle_ratio + 1) *
CPU_THROTTLE_TIMESLICE milliseconds, i.e. CPU_THROTTLE_TIMESLICE /
(1-pct) milliseconds.

Paolo

Reply via email to