|
|
Subscribe / Log in / New account

Low latency for audio applications

Low latency for audio applications

Posted Jan 27, 2005 7:12 UTC (Thu) by xorbe (guest, #3165)
Parent article: Low latency for audio applications

Except that, a musician is not going to be happy when his
app exceeds "80%" and gets dropped back into the normal
realm of scheduling. How come these people can't just be
fed a kernel that does what they want? It's not rocket
science.


to post comments

Low latency for audio applications

Posted Jan 27, 2005 8:48 UTC (Thu) by alonso (guest, #2828) [Link]

Set the limit at 100%... and be happy

Low latency for audio applications

Posted Jan 27, 2005 9:54 UTC (Thu) by gnb (subscriber, #5132) [Link]

Because you need to say what it is you want. If there isn't enough CPU
to meet all requirements, someone needs to decide on a trade-off and
not all users will want the same things: should the RT apps remain
RT even if this makes all the non-RT ones completely unuseable? Surely
the user should make that decision rather than the kernel? Or, as other
people have more concisely put it, the kernel provides mechanism, not
policy.

Low latency for audio applications

Posted Jan 27, 2005 10:55 UTC (Thu) by farnz (subscriber, #17727) [Link]

It is rocket science; if his app exceeds 100% CPU usage, he's not getting what he wants, and there's nothing a better kernel can do about it. As exceeding 100% CPU is going to lock up his machine, the patch allows a musician to set a limit, and then if his realtime applications are going to lock his machine up, the kernel drops their realtimeness, thus giving a musician a chance of recovering. Without this mechanism, the machine can lock hard, and there's no way to discover why, or to recover.

As a simple example of when this helps; a soft synth is normally a realtime application (MIDI in -> Waveform out). When running, a soft synth doesn't take that much CPU; if it did, it wouldn't work. If your algorithm fails, and causes the synth to run away in an endless loop (bad validation of input MIDI data, for example), you're doomed if it can take 100% CPU. If all your RT tasks are limited to 95% CPU between them, you can fire up "top", notice that the soft synth has gone from around 5% CPU to around 90% CPU, and kill it.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds