why did Ubuntu turn off kernel preemption in Edgy?
psusi at cfl.rr.com
Mon Nov 27 20:32:02 GMT 2006
Ulrik Mikaelsson wrote:
> to. Windows, for instance use a default interrupt timer of 100hz ,
> so I would guess if you got 2-3ms latency out of you system in
> windows, it definately wasn't thanks to the interrupt rate.
Windows dynamically increases the timer interrupt rate to meet the
requested needs of the multimedia timers.
> * Virtualization becomes difficult with higher interrupt rates, since
> several OS:s running on the same hardware will further increase the
> interrupt yield, causing the system to ultimately start loosing
> interrupts. 
Having the host hardware/kernel using a high interrupt rate allows it to
provide the virtual environment with more reliable virtual interrupts.
The guest OS in the virtual machine would do better to use a lower
interrupt rate than the host OS.
> Based on this, I would say that any powerful machine with hard latency
> requirements, such as a hard-core gaming and audio/video-production
> would benefit from a high interrupt rate, while laptops, servers and
> "weaker" machines where battery life or throughput is more important
> than latency, lower interrupt rates is highly advised. (Maybe even as
> low as 100hz?)
I don't even see the higher rates as a benefit to hard core gaming and
audio/video applications. As you showed, a modest 250 Hz timer can
easily provide 16ms latency which should be more than sufficient for
these applications. The audio hardware should be operating out of a
ring buffer that holds at least 32 ms of sound, and video frame rates
are typically 29 fps ( for ntsc video ) so a 100 Hz timer is plenty to
synchronize the frame rate to. For games, they synchronize to the video
card's vertical sync interrupt anyhow.
More information about the ubuntu-devel