dahdi-linux/drivers/dahdi
Shaun Ruffell 51bff0d802 wcte12xp: Use interruptible waits to decrease impact on load average.
The wcte12xp does all the checking for alarm in a user space workqueue.
Most of this time is spent sleeping waiting for reads from the framer to
complete.  Tasks in uninterruptible sleeps are added to running tasks
for the purposes of calculating load average. This change makes the
sleeps interruptible so as to not affect the load average as much.

For example, the following command will load and configure the driver and
then print the load average every 10 seconds.

]# modprobe wcte12xp && dahdi_cfg && ((x=12)); while [[ $x -gt 0 ]]; do cat
/proc/loadavg; sleep 10; let x=$x-1; done

With this change:
0.29 0.10 0.02 1/101 29945
0.24 0.10 0.02 1/101 29967
0.20 0.09 0.02 1/101 30019
0.17 0.09 0.02 1/101 30041
0.15 0.09 0.02 1/101 30062
0.12 0.08 0.02 1/101 30085
0.10 0.08 0.02 1/101 30107
0.09 0.08 0.02 1/101 30129
0.07 0.08 0.02 1/101 30151
0.14 0.09 0.02 1/101 30173
0.12 0.09 0.02 1/101 30195
0.10 0.08 0.02 1/101 30217
(and I've seen it get down to 0.0)

Before this change:
0.57 0.22 0.07 1/101 31920
0.48 0.21 0.07 1/101 31942
0.48 0.22 0.07 1/101 31964
0.48 0.23 0.08 1/101 31986
0.41 0.22 0.07 1/101 32008
0.42 0.23 0.08 1/101 32030
0.43 0.24 0.08 1/101 32054
0.45 0.25 0.09 1/101 32076
0.45 0.25 0.09 1/101 32098
0.46 0.26 0.10 1/101 32120
0.47 0.27 0.10 1/101 32172
0.39 0.26 0.10 1/101 32194

(closes issue #18142)
Reported by: foxfire
Tested by: foxfire

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9512 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-08 01:56:56 +00:00
..
datamods wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
firmware dahdi: '-o' -> '--no-same-owner' in drivers/dahdi/firmware/Makefile 2010-10-20 12:22:42 +00:00
hpec Remove mutex emulation 2010-11-04 16:40:29 +00:00
oct612x wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
voicebus wctdm24xxp, wcte12xp: Close a few potential resource assignment leaks. 2010-12-02 22:42:56 +00:00
vpmadt032_loader wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcb4xxp wcb4xxp: Support beroNet BN4S0e PCI Express card 2010-10-20 17:52:47 +00:00
wct4xxp Minor logging text change 2010-10-25 20:01:54 +00:00
wctc4xxp Remove mutex emulation 2010-11-04 16:40:29 +00:00
wctdm24xxp wctdm24xxp: Replace interruptible_sleep_on() with msleep when delaying. 2010-12-01 16:59:20 +00:00
wcte12xp wcte12xp: Use interruptible waits to decrease impact on load average. 2010-12-08 01:56:56 +00:00
xpp xpd_pri: Remove pointless hooksig span op 2010-12-07 11:00:07 +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 Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h 2010-09-24 22:44:53 +00:00
dahdi_dynamic_ethmf.c Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h 2010-09-24 22:44:53 +00:00
dahdi_dynamic_loc.c Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h 2010-09-24 22:44:53 +00:00
dahdi_dynamic.c Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h 2010-09-24 22:44:53 +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 dahdi: Fix 'void *' pointer arithmetic warnings. 2010-09-29 21:32:55 +00:00
dahdi_echocan_mg2.c dahdi: Fix 'void *' pointer arithmetic warnings. 2010-09-29 21:32:55 +00:00
dahdi_echocan_oslec.c dahdi_echocan_oslec: Call olsec_hpf_tx if CONFIG_DAHDI_PROCESS_ECHOCAN_TX is defined. 2010-10-20 12:23:11 +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 Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h 2010-09-24 22:44:53 +00:00
dahdi-base.c dahdi: Prevent unloadable module on failed open. 2010-12-07 14:20:38 +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 dahdi: Atomically set/test if channel has associated network device. 2010-10-20 12:23:16 +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 dahdi: Atomically set/test if channel has associated network device. 2010-10-20 12:23:16 +00:00
wctdm.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcte11xp.c dahdi: Atomically set/test if channel has associated network device. 2010-10-20 12:23:16 +00:00