[asterisk-dev] Re: Kernel modules => mainline kernel

Oron Peled oron at actcom.co.il
Tue Feb 13 15:31:15 MST 2007


On Tuesday, 13 בFebruary 2007 14:23, Benny Amorsen wrote:
> There is no need for one interrupt per port. 1000 interrupts/sec is
> enough, no matter how many cards you have.

1. Let's start with reality. A cursory look in one driver (let's pick
   wct4xxp because everybody referred to Quad-PRI) shows that it registers
   an interrupt handler per-card (via request_irq() in the pci probe
   routine). BTW, this is the normal modus-operandi of most pci drivers.

   To remove any doubt, let's check its interrupt routine...
   Not a surprise, it handle all 2 or 4 ports in the *same card*.

   So 4 Quad-PRI cards with this driver will generate 4000 interrupts/sec.
   Let's compare the data volume:
     8bytes * 30channels * 4ports * 2[R/W] * 1000/sec <= 2Kb/sec of PCM.

   Hmm... 4000 interrupts/sec for a 2Kb/sec data flow, good deal indeed.

   To remove any doubt, this is not a critique about this specific driver
   my driver isn't significantly better. Let's see why...

2. Further, there is another inherent problem in the relation between
   zaptel and the various low-level modules (wct4xxp, wctdm, ztdummy, xpp,
   etc.) Zaptel dictates that all these drivers call zt_transmit() and
   zt_receive() 1000/sec and move their data to/from zaptel buffers.

   This means that even with an ideal low-level driver that generates
   only the theoretical 1000 interrupts/sec. A host with several cards
   of different types (drivers) would have multiple 1000 interrupts/sec.

   [note: this lack of central zaptel synchronization causes other
          problems as well, like voice quality deterioration and
          problems with fax machines].

Any ideas how to solve this mess without growing the interrupt interval?
[which would force a zaptel/chan_zap API change].

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
oron at actcom.co.il                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

Linux: The OS people choose without $200,000,000 of persuasion.
          -- Mike Coleman


More information about the asterisk-dev mailing list