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

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

Subject: [linux-audio-dev] Re: high level laaga
From: Abramo Bagnara (abramo_AT_alsa-project.org)
Date: Fri May 11 2001 - 21:51:51 EEST


Paul Davis wrote:
>
> Thats 7.7% of the time available for computing a 1.3ms audio
> fragment. Make that a more interesting system (say, 4 components), and
> you've got 15% of the time available spent context switching. Make it
> a system somewhat like the one I sense you imagining (lots of small
> components, not much LADSPA-inlining-ness), and that number might rise
> to over 50%.
>
> I am hoping that I've demonstrated that context-switching is not
> scalable for low-latency work, and has noticeable costs even in the
> simplest possible case. Is my hope misplaced?

Not at all, numbers speaks clear and you've been very accurate.

However if I interpret right the web page:

"The benchmark times how long it takes to go from one process to another
when the context switch is done by reading and writing data."

Then I suppose this is not the pure context switch time, but it's
cumulated with read/write syscall and copy time that seems to be
significative. Note also that in current kernel code pipe needs a double
copy (Manfred Spraul is improving that in recent past days).

If (I underline "if") the cost is ~2 microseconds this means 0.1538% of
CPU use per context switch.

Do you think I'm missing something?

I'll try to do some tests here (with a k6 II @ 333Mhz: a little machine)
using sched_yield and rdtsc. Probably I can obtain more data.

However I don't want that this discussion takes too much place: do you
agree to choose to design one API suitable for both approaches?

-- 
Abramo Bagnara                       mailto:abramo_AT_alsa-project.org

Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy

ALSA project http://www.alsa-project.org It sounds good!


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

This archive was generated by hypermail 2b28 : Fri May 11 2001 - 22:11:50 EEST