Re: [PATCH 3/6] sched: high-res preemption tick

Andi Kleen
2007-10-31T21:53:17Z

Peter Zijlstra <a.p.zijlstra@chello.nl> writes:

> Use HR-timers (when available) to deliver an accurate preemption tick.
>
> The regular scheduler tick that runs at 1/HZ can be too coarse when nice
> level are used. The fairness system will still keep the cpu utilisation 'fair'
> by then delaying the task that got an excessive amount of CPU time but try to
> minimize this by delivering preemption points spot-on.

This might be costly when hrtimers happen to use an more expensive
to reprogram time source. Even an APIC timer access is fairly slow.
And you'll potentially add the to lots of context switces.

Not sure that is a good idea for performance in general.

-Andi