Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/ic



On Thu, May 22, 2003 at 03:52:16AM -0400, John Hawkinson wrote:
> David Young <dyoung%netbsd.org@localhost> wrote on Thu, 22 May 2003
> at 06:34:48 +0000 in <20030522063448.49419B004%cvs.netbsd.org@localhost>:
> 
> > Update to wi interrupt handling:
> > 
> >   No longer require a hi-low-hi transition of a status bit before
> >   we believe it. It's a performance killer, and without it there
> >   does not seem to be a race.
> 
> Comments like this ("performance killer") are always a bit worrysome.

  You might have misunderstood the commit message: the patch *improves*
  performance.  Erik Berls (cyber@) tested and it improved the speed
  of his Prism 2.5-based USR-brand radio from 4-5KB/s to greater than
  400KB/s.

  I think that the reason for the performance increase is that interrupts
  were coming too slow, and the driver did not do enough work in each
  interrupt. Here is some more explanation:

  The old interrupt handler assumed that after the host acknowledged an
  event, the host could win a race with the firmware and re-read the
  status register before the firmware updated it. It required a 1-0-1
  transition of a status bit, or a new interrupt, before it believed a 1.
  This is very paranoid, but at the time that I wrote it, Prism firmware
  was locking hard, and I suspected a chain of events starting with
  this race and ending with a corrupted Rx buffer queue on the radio.
  I don't think that paranoia is justified any longer.

  Also, the old interrupt handler did not write the Prism/Lucent
  interrupt-enable register to enable/disable interrupts at top and
  bottom. Writing the register to re-enable interrupts may provide the
  edge condition that the Lucent cards need to make a new interrupt.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933



Home | Main Index | Thread Index | Old Index