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: Benno Senoner (sbenno_AT_gardena.net)
Date: pe joulu  10 1999 - 14:31:44 EST


On Fri, 10 Dec 1999, Alexander König wrote:
> Hi,
>

>
> 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
> audio-thread anymore (Although I still get rare audio-dropouts (no
> matter whether the GUI-thread is busy or not)). But: running as root (==
> 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?
>
> Well, anyway this problem is somewhat hard to debug so I could really
> use some suggestions ;)

remember that you need to be root to use SCHED_FIFO, that means
when setting the scheduling policy to SCHED_FIFO as a regular user
, the syscall simply returns -1 and does nothing.
You get higher priority because you raised the priority using setpriority(),
that means as normal user your audio engine runs still in the unix scheduler,
but with nice -20 which is still not perfect , because the gui thread could
interrupt the audio thread.

the lockups you are experiencing, are imho some deadlock, where your app uses
up all CPU, and you feel like the machine is frozen, even if the kernel is stil
alive.

any opinions from the other folks ?

Benno.

>
> Oh, btw, I use a plain 2.2.13 currently.
>
> Bye,
> Alex
> --
> _______________________________________________________________________
> Alexander König - alex_AT_42.fht-esslingen.de
> http://termX.cjb.net
>
> [From the Homer Quotables:]
>
> If it'll make you feel any better, I've learned that life is one
> crushing defeat after another until you just wish Flanders was dead.
>
> -- Homer Simpson
> Homer and Apu

--
Benno Senoner
E-Mail: sbenno_AT_gardena.net
Linux low-latency audio / scheduling latency benchmarks
http://www.gardena.net/benno/linux/audio


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