[asterisk-biz] Recent REMOTE CRASH BUG

Kevin P. Fleming kpfleming at digium.com
Sun Mar 4 22:22:15 MST 2007


Trixter aka Bret McDanel wrote:
> for part of what I said, ok I was misinformed.  However 1 per ms is
> still 10-20 times more frequently than is generally needed (there are
> exceptions but they are generally rare). 

Not quite :-) Remember that until very recently, there was no Zaptel
hardware that had on-board echo cancellation. Unless I am mistaken,
attempting to do echo cancellation in 10ms or 20ms chunks may be
unworkable... certainly it would cause much larger (but less frequent)
CPU usage spikes. There may also be some negative impacts on host-based
conference mixing, but then we already have those same effects when
mixing VOIP channels so people are used to it :-)

> I also dont think that a DMA ring buffer exists (*please* correct me if
> I am wrong) so that it doesnt take the cpu to blit the data off the card
> into ram.  That isnt that hard to do, you just write to the bus address
> specified in the card init, which is a value reserved by the kernel. 
> The card needs to be able to write to those addresses, which since its
> on the bus it has access it just needs the firmware to allow it.

Nearly all of our cards already use bus-mastered DMA transfers; I can't
speak to other vendors cards, of course. I don't know for sure how many
buffers they can handle, but I do know that is area that is being worked
on for improvement. I agree that in many applications being able to only
receive an interrupt when a 'full frame' is present would be valuable,
since in applications where hardware echo cancellation is in use and the
channels are being bridged to VOIP there is no value in receiving data
in 1ms chunks.

> Zaptel would have to be updated since it doesnt really support that
> method, instead relying on the 1000 interrupts per second thing instead
> of 50 per span.

We are already talking about a re-architecting of Zaptel based on this
idea, along with mmap-able buffers that are reachable both from the
userspace application and the hardware (to reduce data copying, if not
eliminate it), among other improvements. Keep in mind that Zaptel's
design comes from the days of single-channel analog interface cards and
single-span T1 interface cards... it has been pushed to where it is
today, but there are definite areas for improvement.


More information about the asterisk-biz mailing list