From d646ea33ece2f126a2cb6bcbf901b5c8bec03e20 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 25 Feb 2010 17:34:02 +0000 Subject: wctdm24xxp: Only use the first three EFRAMES for module commands. On a 2.6.32.7 debug kernel with a TDM2400, this can save up to 30ms every second of processing time without any appreciable impact on runtime performance since most of the commands to the modules during normal operation are reads, and therefore only one would be in each SFRAME anyway. The impact of this change is less for TDM410 and TDM800 since they already limit the number of modules that they look for queued commands for. There is still more room for optimizing module command handling. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8096 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctdm24xxp/base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 9b16d80..51c807a 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -865,7 +865,8 @@ static inline void wctdm_transmitprep(struct wctdm *wc, unsigned char *writechun if (y < wc->desc->ports) writechunk[y] = wc->chans[y]->writechunk[x]; } - cmd_dequeue(wc, writechunk, y, x); + if (x < 3) + cmd_dequeue(wc, writechunk, y, x); } if (!x) wc->blinktimer++; @@ -1102,7 +1103,8 @@ static inline void wctdm_receiveprep(struct wctdm *wc, unsigned char *readchunk) for (y=0;y < wc->cards;y++) { if (likely(wc->initialized) && (y < wc->desc->ports)) wc->chans[y]->readchunk[x] = readchunk[y]; - cmd_decipher(wc, readchunk, y); + if (x < 3) + cmd_decipher(wc, readchunk, y); } if (wc->vpm100) { for (y=NUM_CARDS;y < NUM_CARDS + NUM_EC; y++) -- cgit v1.2.3