views:

903

answers:

5

I have two Digium Wildcard TDM800P with 8 FXO ports each. When I connect both at the same time IRQ misses start showing up making my computer unresponsive and unusable.

One card works fine but I need all 16 FXO ports to work to receive calls from my Telco. Is there a way for the cards to communicate with each other so they don't generate as many interrupts. Or a way to tweak Linux to dedicate separate IRQ's for each card.

I have tried disabling Audio, ACPI and USB ports. Still too many IRQ misses.

A: 

PCI Digium cards do not work well when you try to have more than one in the same computer. I had a similar problem with 2 TE405 cards in the same computer and had to switch to a Sangoma card (I only needed 1 Sangoma because they support up to 8 E1's in the same card and that's what I needed). Or you can try the AEX800 which is like the TDM800 but it's PCI-X instead of plain old PCI. IIRC the problem is PCI-related.

Chochos
PCI-X I suppose its a diferent slot? Or there is a chance that my mothermoard supports it? (My mother board has 3 same looking pci ports)Note: 8 E1? aprox 240 channels thats a huge capacity.
JorgeO
PCI Express is different from plain PCI. You have to check your hardware to see if it's supposed. PCI-X is smaller I think (I'm not really into hardware).
Chochos
A: 

JorgeO: Sounds to me like you need to update your drivers. The latest zaptel and DAHDI releases include drivers for the TDM800P that configure the board in a way that allows the system to be more tolerant of host system interrupt latencies.

I upgrade zaptel to DAHDI. Im looking for a hardware related solution. Like connecting both card together so they use the same interrupt to handle events. I see jumpers in the card one of them has the initials 'clk' like clock...
JorgeO
+1  A: 

This question would be better posted at serverfault, as this is a pure hardware problem.

The problem you are experiencing is typical of high interrupt PCI cards in general, and Digium telephony cards in particular. Please keep in mind that the problem stems from having both cards in the same PCI bus, your objective is to not have them share IRQ interrupts.

There are a couple of things you can try that can resolve your problem:

1) Upgrade to DAHDI drivers. They have better IRQ contention.

2) Change one of the cards to another PCI slot. Some PCI slots on the motherboard share lanes. You want to avoid this. Check your motherboards manual. Also, you can execute the following

cat /proc/interrupts

You should receive output like this

               CPU0       CPU1       CPU2       CPU3
  0:         37          2          5          8   IO-APIC-edge      timer
  1:          1          1          0          0   IO-APIC-edge      i8042
  8:          0          0          1          0   IO-APIC-edge      rtc0
  9:          0          0          0          0   IO-APIC-fasteoi   acpi
 12:          1          0          0          3   IO-APIC-edge      i8042
 14:         33         35         31         30   IO-APIC-edge      ide0
 20:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb2
 21:         37         37         41         38   IO-APIC-fasteoi   uhci_hcd:usb1, uhci_hcd:usb3, ehci_hcd:usb4
1269:      14357      14387      14387      14372   PCI-MSI-edge      eth0
1270:       2523       2490       2489       2503   PCI-MSI-edge      ioc0
NMI:          0          0          0          0   Non-maskable interrupts
LOC:     487635     236288     376032      88504   Local timer interrupts
RES:        507        516        571        701   Rescheduling interrupts
CAL:        205        281        237        201   function call interrupts
TLB:       2835       2190       2221       1737   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0   Threshold APIC interrupts
SPU:          0          0          0          0   Spurious interrupts
ERR:          0

See how in interrupt 21 is shared by usb1, usb3, and usb4? You don't want that to happen to your Digium cards. By the way, Digium cards ususaly show up as TDPXXX.

3) Load balance interrupts between CPU's - If your PC has more than one CPU and your kernel and motherboard support IO-APIC, you can load balance interrupts between different CPU's. This will also ease greatly the interrupt load on your CPU's. If you check my previously posted code, you can see that Local timer interrupts are spread evenly between CPU's. If your Digium cards hammer only one CPU (this happens) you can spread out the load by trying the following. Say we wanted to change IRQ 21 (the aforementioned USB's)

cat /proc/irq/21/smp_affinity
ffffffff

All those 'f' tell us that the interrupt load from IRQ 21 is load balanced between all CPU's. If you want to assign it to a certain CPU, add that nuber to the right in hexadecimal. For example, lets say I want the USB's to only interrupt CPU0.

echo 1 > /proc/irq/21/smp_affinity 
cat /proc/irq/21/smp_affinity 
00000001

So now only the first CPU (CPU0) is enabled to receive these interrupts.

Good luck!

Alex
At the time I didnt know serverfault. But still, great answer, upgrading dahdi actually solved the problem, but its great to know that you can assing interrupts to a particular CPU.
JorgeO
A: 

I have Debian and not work, change irq eth0 -> cpu0 a cpu2 cat /proc/irq/xxx/smp_affinity 00000003 but dont work the procees continue cpu0

fejame
A: 

Hi how can I input the ffffffff? when I type cat /proc/irq/21/smp_affinity and enter, it go back to the main line

Haywood