[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using USRP from multiple applications simultaneou
From: |
Stephane Fillod |
Subject: |
Re: [Discuss-gnuradio] Using USRP from multiple applications simultaneously |
Date: |
Sun, 1 May 2005 22:25:15 +0200 |
User-agent: |
Mutt/1.5.8i |
On Sun, May 01, 2005 at 08:27:34PM +0200, Harald Welte wrote:
> AFAICT, at the moment there is no way to use a single USRP from multiple
> application programs at the same time. This is quite unfortunate, since
> you might want to run a transmit and a receive program that are totally
> independent (or even two tx and two rx programs).
[...]
I agree, this is a legitimate need, to allow more modular software
architecture.
> I was also thinking of speeding up the USB data transfers by using a
> better kernel/userspace interface than libusb (which does
> copy_{from,to}_user for every URB). Something like a mmap()ed
> ringbuffer comes to mind, much like the mmap() feature of AF_PACKET or
> the PF_RING socket. But that's probably one of the things that would
> be nice and I never find the time to implement...
"Premature optimization is the root of all evil", Donald Knuth.
Before implementing, verify that this is the biggest spot of
optimization. You can use great tools like OProfile for that purpose.
Now, I have the same intuition as you. Copying and copying over
several times data that comes at 32MB/s must have a significative
impact on CPU cache, totally washing it up.
The insidious side-effects may not even show the cache misses on
this code, but on following code down the pipe..
Do you(or somebody else) know a more clever kernel/user interface
with zero-copy for the USB subsystem?
Besides the copy_{from,to}_user, GNU Radio does couple of unnecessary
copy. Those spot will get care when entering optimization round.
I guess now we're more in functional development, but it's always
open on who has spare time ;-)
Cheers,
--
Stephane