dahdi-linux/drivers/dahdi
Shaun Ruffell d08cdac785 dahdi: Only disable/enable interrupts once when iterating through channels.
dahdi_receive, dahdi_transmit, and dahdi_ec_span are mostly called from
interrupt context anyway, so we can save a few cycles by not saving and
restoring the interrupt flags for every channel.

On one 2.40GHz Xeon test machine, for a span with 24 channels w/o echocan
enabled with ~10000 samples:

Function        Avg Before   Avg After
======================================
dahdi_receive   2.109 us     1.547 us
dahdi_transmit  3.203 us     2.766 us
dahdi_ec_span   0.416 us     0.454 us

NOTE: The time went up slightly on dahdi_ec_span since I did not have
software echocan enabled and this change calls local_irq_save regardless
in dahdi_ec_span.  The slight increase in processing time in this case
is overshadowed by the savings in dahdi_receive and dahdi_transmit. If
echocan was enabled on all the channels there would be a time savings
in that dahdi_ec_span too.

When dahdi_receive/dahdi_transmit are called every millisecond (when
DAHDI_CHUNKSIZE == 8) this saves ~0.1% CPU time for each span.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9406 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24 22:44:30 +00:00
..
datamods wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
firmware wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
hpec wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
oct612x wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
voicebus wcte12xp, wctdm24xxp: Convert vbb cache from kmem_cache to dma_pool. 2010-09-23 21:38:52 +00:00
vpmadt032_loader wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcb4xxp wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wct4xxp wct4xxp: Drop usage of 'volatile' qualifier. 2010-09-23 21:38:43 +00:00
wctc4xxp wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wctdm24xxp wcte12xp, wctdm24xxp: Convert vbb cache from kmem_cache to dma_pool. 2010-09-23 21:38:52 +00:00
wcte12xp wcte12xp: Remove unused 'dtmfactive', 'dtmfmask', and 'dtmfmutemask' members. 2010-09-20 18:54:47 +00:00
xpp wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
adt_lec.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
adt_lec.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
arith.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
biquad.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_dummy.c dahdi_dummy: #include <linux/slab.h> for kzalloc and friends. 2010-09-07 13:47:24 +00:00
dahdi_dynamic_eth.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_dynamic_ethmf.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_dynamic_loc.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_dynamic.c dahdi_dynamic: Update copyright. 2010-09-23 21:38:57 +00:00
dahdi_echocan_jpah.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_echocan_kb1.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_echocan_mg2.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_echocan_oslec.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_echocan_sec2.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_echocan_sec.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_transcode.c dahdi, dahdi_transcode: Remove mmap interface. 2010-09-01 15:46:25 +00:00
dahdi-base.c dahdi: Only disable/enable interrupts once when iterating through channels. 2010-09-24 22:44:30 +00:00
digits.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
ecdis.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
fir.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
fxo_modes.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
Kbuild wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
Kconfig wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
Makefile wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
makefw.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
pciradio.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
pciradio.rbt wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
proslic.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
tor2-hw.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
tor2.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
tormenta2.rbt wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcfxo.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wct1xxp.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wctdm.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcte11xp.c wcte11xp, wcte12xp: Fix a long-standing issue with shutdown 2010-09-10 15:54:35 +00:00