[asterisk-dev] Digium TE820 on BSD: bunch of missed interrupts

Łukasz Wójcik lukasz.wojcik at zoho.com
Wed May 14 13:40:58 CDT 2014


Hello Russ,

2014-05-14 17:36, Russ Meyerriecks:
> On Wed, May 14, 2014 at 2:57 AM, Łukasz Wójcik <lukasz.wojcik at zoho.com
> <mailto:lukasz.wojcik at zoho.com>> wrote:
>
>     I would appreciate any clues and suggestions on how to improve the
>     latency situation.
>
>
> I'm unfamiliar with BSD driver development but here are a couple things
> I might check:
> - Ensure the interrupts are being acknowledged properly by the driver.
> If interrupts were left un-acknowledged, it could produce this scenario.

Unless there's something device-specific that has to be done, everything 
seems to be in order in this resort.

> - Ensure all memory addresses are mapped properly regarding the
> descriptor ring. If memory addresses were incorrectly loaded to the card
> for the dring, it may cause similar issues.

Hmm that's a good point, although I would expect some panics if that 
would be the case. I will certainly check that, however.

> - Time the irq handler to find it's running time. Linux has a tracer for
> this, maybe BSD does as well. (I think this is least likely, unless some
> BSD quirk is hanging up in the middle of the irq routine)

That's what I just did. It seems that irq handling routine takes 
260-280ms during span setup. My measurements indicate that the most time 
is being spent in '__t4_set_timing_source_auto()' which is only called 
from the interrupt handler when T4_CHECK_TIMING flag is set (which I 
guess happens only during span setup ?). After all spans are configured, 
interrupt handling time drops to average 1ms (min: < 1ms, max: 5ms), and 
that's where the driver first wants to bump latency up and where missed 
interrupt message starts to appear:

(..)
Missed interrupt. Expected ident of 97 and got ident of 111
<maaaaaaaaaaaaaany similar as above, differing with idents>
(..)


Another question I'd like to ask is:

Assuming that 'status' contains whatever device status register holds, 
what does the check: (status & 0x2) mean ?


Once again, thank you for your help Russ!

Sincerely,
-ŁW




More information about the asterisk-dev mailing list