Subject: Re: [linux-audio-dev] atomic xchg
From: Bill Gribble (grib_AT_cs.utexas.edu)
Date: to loka 14 1999 - 20:35:00 EDT
Paul Barton-Davis <pbd_AT_Op.Net> writes:
> yes, but pthread_mutex_lock() doesn't spin at all. if the lock is
> held, your thread will go to sleep. on an MP system, this is a disaster.
I'm just not convinced that this is the case. We're talking about
data rates in the several-MB-per-sec range here, and I just don't
believe that the latency of a thread sleep/wakeup is going to kill
you, particularly not if your system is designed to use a sensible
amount of buffering and POSIX RT scheduling priorities.
Unless you have a smaller number of threads doing significant work
than you have CPUs on the system, you'll have to take a break
somewhere down the road anyway. If someone else holds a lock you
need, well, I guess it's a good time to let another thread run.
Bill Gribble
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:59 EST