Will Dapper support RLIMIT_RTPRIO?

Lee Revell rlrevell at joe-job.com
Fri Feb 17 23:07:55 GMT 2006


On Thu, 2006-02-16 at 18:42 +0100, Fabio Massimo Di Nitto wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Lee Revell wrote:
> 
> > The kernel side problems are mostly solved,
> 
> What problems are we talking about here? Last time i was asked to apply kernel
> patches for Realtime they were scary and extremely intrusive.
> 

The terrible RT performance.  Since kernel 2.6.12 or so it's now
possible to get 2-5ms audio latency with a vanilla kernel.  With, say,
2.6.5, you can't even meet a 30ms RT constraint.

> > Thanks for your help - I will try to gather the necessary patches to
> > bash, PAM, and glibc to properly support kernels >= 2.6.12 before the
> > freeze.
> 
> Are we sure we do not need more kernel patches?

You are confusing two separate realtime problems.  The first was the
Linux kernel's realtime performance (max scheduling delay between event
and wakeup for a max priority SCHED_FIFO task) from 2.6.0 through around
2.6.12 was godawful.  This has basically been fixed.  The realtime
preemption patch still improves the situation, but it's no longer
required for ordinary low latency audio work.

Once this was fixed, a second, much simpler problem came to the
forefront - historically, only the superuser could run RT tasks.
Requiring root privileges to do low latency audio is clearly
unacceptable, so an rlimit based solution was developed - just add:

@audio     rtprio    soft  80

to /etc/security/limits.conf to allow users in group 'audio' to run
SCHED_FIFO processes up to priority 80.  This is supported by kernels
2.6.12 and up but updates to PAM, glibc, and bash are needed.

Lee







More information about the ubuntu-devel mailing list