[linux-audio-user] dipping toes in 2.6 waters

Florian Schmidt mista.tapas at gmx.net
Mon Aug 2 19:57:23 EDT 2004


On Mon, 02 Aug 2004 14:40:37 -0700
Florin Andrei <florin at andrei.myip.org> wrote:

> I've not been able to follow LKML too closely in the last few weeks,
> so i'm out of loop with the recent developments. If some of you folks
> did watch it, do you care to bring the rest of us up to speed WRT the
> latest 2.6 developments that are related to "audio" kernels? The
> issues i'm interested in are:
> 
> 1. "Classic" pre-emptability. Why Con Kolivas recommends against
> enabling preempt in vanilla 2.6, and (if it was a valid
> recommendation) whether that is still an issue
> 
> 2. The Ingo Molnar voluntary preempt patches. Are they ready yet,
> yes/no? With or without -mm?
> 
> 3. Staircase scheduler, either as a standalone thing or incorporated
> in the latest -mm patch. Better than vanilla for audio, yes/no?
> 
> 4. Combinations of the above. Is the classic preemt compatible with
> the rest? Anyone using the "vanilla preempt + Ingo Molnar patches +
> Andrew Morton series + staircase" supercombo?

Hi, while i cannot give detailed answers to your questions i might chime
in with some general observations i made..

There are still unsolved issues with NPTL and jackd. Since 2.6.x has the
infrastructure to use NPTL [as opposed to unpatched 2.4.x] you will
stumble over these issues. The "fix" to export LD_ASSUME_KERNEL=2.4.19
[which makes libc use linuxthreads and not NPTL] seems to help with
these issues though. But as long as the problem isn't fully understood,
noone can say if there aren't any other potential issues with this.

2.6.x vanilla, with preempt enabled yields usable performance for hd
recording and other work. It is not sufficicent for real low latency
work, since although most of the kernel is preemptable, several very
important parts are not.. I can use 2*512 frames with jack alright in a
vanilla 2.6.x with RT jackd and the LD_ASSUME_KERNEL fix. But i don't
get
rocksolid-compile-a-kernel-at-the-same-time-and-still-get-no-xruns-perf
ormance as i did in 2.4.x+preempt+ll..

I once tried the staircase scheduler on a vanilla 2.6.x with preempt [i
think i applied the ck-patch directly to it, but it's been a while].
Since the staircase scheduler is only used for SCHED_OTHER threads, an
RT'ed jackd's performance will not differ substantially to a kernel with
the default O(1) scheduler. SCHED_FIFO threads are in a completely
different scheduling class which always gets cpu before any SCHED_OTHER
stuff..

Ingos volountary preemption stuff on the other hand does improve the
situation somewhat. I can use jackd and jackd-rack at 2*256 pretty
reliably.. 2*128 is ok, too, if you don't care about the occasional
xrun. 

Right now i use 2.6.8-rc2-M5 and it looks good. The threaded IRQ handler
stuff by Ingo looks exciting, too. Afaik this makes all threaded irq
handlers fully preemptible, but i'm not sure about this. I'm also not
not sure whether i see real improvements. The irq handlers all run at
priority -51. I have jackd running with prio -75 [so it should be
scheduled before the prio=-51 irq threads] and i have my soundcard irq
handler set to non threaded.. I will watch this over the next days or
will try O2 maybe tonight..

I think that this is the right mooment to grab a vanilla 2.6.8-rc2 and
just try one of Ingos new volountary preemption patches. You might be
positively surprised.. If not, send a report to Ingo. Lee Revel is also
busy testing Ingos patches and reporting all latencies he found. But
more testers are needed.

-- 
Palimm Palimm!
http://affenbande.org/~tapas/




More information about the Linux-audio-user mailing list