[linux-audio-user] Realtime Audio + Networking

Joshua Boyd jdboyd at jdboyd.net
Tue Jun 6 19:14:39 EDT 2006


On Tue, Jun 06, 2006 at 08:51:13PM +0200, Lars Luthman wrote:
> On Tue, 2006-06-06 at 14:31 -0400, Joshua Boyd wrote:
> > On Tue, Jun 06, 2006 at 01:39:31PM -0400, Lee Revell wrote:
> > > On Tue, 2006-06-06 at 11:10 -0400, Joshua Boyd wrote:
> > > > I have CONFIG_PREEMPT and CONFIG_PREEMPT_BKL on.  My application runs
> > > > with SCHED_FIFO and has an elevated priority, but not realtime
> > > > priority.  When I tried setting it to realtime priority it grinds the
> > > > networking, control panel, and VGA display applications to a halt. 
> > > 
> > > Uhhh, SCHED_FIFO and "realtime priority" are the same thing.
> > > 
> > > Can you be more specific?
> > 
> > setpriority(PRIO_PROCESS, 0, -20);
> > 
> > I was under the impression that that set priority to a "realtime"
> > priority, although rereading the man page I don't see any specific
> > correlation listed between -20 and realtime.
> > 
> > I also do: sched_setscheduler(0, SCHED_FIFO, &sp);
> > 
> > When I do the setpriority to -20, basically everything other than the
> > main application grinds to a halt.  If I use -10 instead, other programs
> > work fine, but networking is then allowed to interfere with the main
> > program.  
> 
> Just checking - is the SCHED_FIFO thread ever yielding the CPU? Or is it
> just running a loop without ever sleeping or waiting for some lock?

Every thread in the process (since as I understand it, every thread in
the process is being set to sched_fifo) blocks on something.  The video
thread blocks on the video card, the audio thread on the audio card, and
most other threads block on pthread_cond_waits (one house keeping thread
blocks on sleeps). 



More information about the Linux-audio-user mailing list