Re: [linux-audio-dev] Re: high level laaga

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

Subject: Re: [linux-audio-dev] Re: high level laaga
From: Paul Davis (pbd_AT_Op.Net)
Date: Sat May 12 2001 - 14:00:54 EEST


In message <20010512110714.C12699_AT_ecs.soton.ac.uk>you write:
>On Fri, May 11, 2001 at 09:57:22PM -0400, Paul Davis wrote:
>> Steve - i did some more calibration of your code with rdtsc.
>>
>> the proc() call takes about 3500 instructions to execute. on my
>> system, thats about 5usec. the time between SIGUSR1 being received by
>> the main process averages about 80usec. as i understand your code,

   [ ... ]

>So thats aproximatly 75us penalty for each pair of signals? Thats
>certainly to much. Its about 50,000 instructions which sounds very high,
>what's the kernel doing in that time?

i don't know, though i'd guess some of that time was caused by memory
accesses needed to refill the cache.

as a comparison, there is code in
quasimodo/libs/pbd/pthread_spinlock.cc which measures the same thing
but between threads. on the same system as the above numbers come
from, it takes about 20usecs to move from one thread to another (using
pthread_cond_signal(); pthread_cond_wait()) which ultimately comes
down to a kill(2) call. That makes 40 usecs for the roundtrip, or
about 50% of the multiprocess case. Still too long for scalable use in
a low latency context, but its a pointer to the differences between
the multiprocess and single process situations.

and just to repeat, although the minimum context switch time will
scale linearly with CPU Hz, the cache effects are a function of the
TLB and the memory speed, which are not (currently) scaling with CPU
Hz.

--p


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

This archive was generated by hypermail 2b28 : Sat May 12 2001 - 14:22:57 EEST