why did Ubuntu turn off kernel preemption in Edgy?

Forest Bond forest at alittletooquiet.net
Mon Nov 27 22:23:07 GMT 2006


On Mon, Nov 27, 2006 at 03:32:02PM -0500, Phillip Susi wrote:
> 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.

My knowledge on this topic may not be technical enough to really argue the
point, however, I think you are missing a few things:

Having a higher frequency timer not only reduces the necessary buffer size used
for low latency digital audio, it also increases the possible timing resolution
afforded to applications that are generating and reacting to events in real
time.  This is especially important for MIDI timing, as well as software effects
and synthesizers, which generate audio data on the fly, and in response to
unpredictable events.

Also, I'm not sure if 16ms latency is low enough for some folks, who claim to
want something on the order of 5-10ms.  Don't have too much of an opinion here;
16ms is fine for me.  That said, just because the timer resolution theoretically
enables 16ms latency, I think the reality of the situation differs slightly,
especially with no realtime preemption.  Consider that a typical software
synthesizer plays notes in response to MIDI events generated both inside the PC
and by external sources.  It would seem to me that you start to get 16ms + 16ms
+ ... but I don't really know how this stuff works at a low level.

I do know this: Chris Cannam and Paul Davis, both widely considered to be
authoritative on the subject of Linux audio, have each indicated that 1000Hz
timer and realtime preemption are near-critical for professional Linux audio
work.  Cannam's Rosegarden actually notifies the user of potentially poor MIDI
timing when run on a system with a 250Hz timer.

-Forest

P.S. I do hope I've not mis-paraphrased Chris or Paul; consult them directly if
you want to know what they really think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20061127/85e1ae6d/attachment.pgp 


More information about the ubuntu-devel mailing list