discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] New implementation for fusb_linux without allocs/free


From: Stefan Bruens
Subject: [Discuss-gnuradio] New implementation for fusb_linux without allocs/frees
Date: Mon, 23 Feb 2009 07:38:14 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27.7-9-mtrr_san; KDE/4.2.0; x86_64; ; )

Hi,

attached is a new version for fusb_linux.cc.

The current implementation uses three std::list lists for free, pending and 
completed urbs, so submitting a single urb causes three allocs and three frees 
(pushing and popping of the list).

The new implementation uses a circular list for the urbs, where each urb is 
marked as free, pending or completed. As the total number of allocated urbs is 
constant, no allocs or frees are needed.

Benchmark:
usrp/host/apps/test_usrp_standard_tx -B 512 -N 64 -M 128

old code needs ~990e6 instructions, new code 690e6 instructions. The call to 
usrp_basic_tx::write goes down from 380e6 to 80e6 (so almost down to a fifth 
...), the remaining instructions is the pattern fill for the sample buffer.

Regards,

Stefan
 
-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
phone: +49 241 53809034     mobile: +49 151 50412019

Attachment: fusb_linux_2.cc
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.

Attachment: fusb_linux_2.h
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]