[Asterisk-Users] Re: four wildcards in a single pc

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Mon Dec 13 11:34:00 MST 2004


On December 13, 2004 11:53 am, Stephen R. Besch wrote:
> 1) This is not to minimize the problem, but 1000 interrupts per second
> is quite a few, but not an overwhelming amount. Keep in mind that an
> "unbuffered" serial card (and there are more than a few of these out
> there) working at 19.2 Kbaud will rack up 1900 interrupts per second and
> the CPU doesn't even sweat. Even an old pig CPU wasn't much strained by

Ahh but the dumb serial driver isn't trying to do echo cancellation or other 
CPU intensive tasks in the bottom-half interrupt handler (i.e. when 
interrupts are disabled) -- the Digium drivers I think are unique in this 
respect.

> 2) While it is hard to estimate directly, if the driver is properly
> designed, the number of interrupts should not scale linearly. One drive
> should handle all cards, and part of the time there will be more than
> one card needing servicing on an interrupt. If the driver does not test
> for this, then it should.

I've brought this up a few times -- If you have 1 1000Hz interrupt already, 
use it and disable the timer on subsequent cards and use the one interrupt to 
start capturing and working with the data on ALL cards.

>   In fact, I suspect that the buffer is a standard 16-byte FIFO with the
> threshold set at 8 bytes. What this means is that it would be possible
> to handle all 4 cards in a single interrupt, depending of course on the
> design of the buffer, by always emptying all 4 card's buffers on any
> interrupt. In fact, only one card (i.e., the master) should even have
> interrupts enabled!

IIRC The cards do not have 16550-style UARTs on them, so the FIFOs could be 
anything.

> 4) All of the preceding notwithstanding, I suspect that the real issue
> has nothing (or little) to do with interrupt load, but, given that the
> card uses CPU cycles rather than a DSP, the problem is more likley CPU
> overload from data handling, which in turn, causes missed interrupts.

I disagree -- I've been doing some (very basic) preliminary testing with the 
Sangoma A101u card (single/dual-span T1) and even with echo cancellation the 
card seems to be far more able to handle shared interrupts and high CPU loads 
without sounding "funny" -- perhaps this is just some kind of driver issue, 
since really hardware's hardware and 1000 interrupts a second is an eon to a 
modern CPU.

-A.



More information about the asterisk-users mailing list