Re: [linux-audio-dev] SCHED_FIFO machine stalls

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] SCHED_FIFO machine stalls
From: maarten de boer (maarten_AT_things.nl)
Date: pe joulu  10 1999 - 13:14:27 EST


Hi

> I'm currently doing some terminatorX hacking and ran in to some
> problems:

Great program BTW.

> After creating the audio-thread the GUI-thread task-priority is set to
> 20 via setpriority(). With pthread_attr_setschedpolicy() the
> audio-thread is run with SCHED_FIFO-policy. Additionally I do a
> setpriority() to level -20 although this possibly doesn't make much
> difference I guess it won't hurt.

Yeah, that seems redundant to me.
In my opinion it is not be necesairy at all to change the
priority of the GUI thread. The audio thread had SCHED_FIFO
priority and thus goes first.

> The good news is: it actually works! I love this Kernel ;) The
> GUI-thread does painting at 486-speed but it doens't hurt the

Yeah, GTK might not be the ideal choice in this case.
I'd say that for such a dedicated task where performance
is a main issue FLTK is a better choice.

I'd say that especially for terminatorX you *do* want the
GUI to have decent speed, at least the mouse-event handling.
Maybe you need a seperate thread for the mouse-events, but
maybe this complicates things too much...

> audio-thread anymore (Although I still get rare audio-dropouts (no
> matter whether the GUI-thread is busy or not)). But: running as root (==

You should apply the low-latency patch, this should solve that
problem.

> with the code described above enabled) tX sometimes causes system
> stalls. At first I thought that the cause of this might be some
> pthread_mutex-deadlocks() but I guess these should occur in normal
> operation mode (not messing with the scheduler at all) too, shouldn't
> they?

Are you sure you don't have a bug in the audio processing code?
If you enter a tight loop at rt-priority, you loose your system.

Good luck, indeed a PITA to debug...

Maarten


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST