freebsd-nq/sys
Bruce Evans b848e03260 Avoid a race and a pessimization in bge_intr():
- moved the synchronizing bus read to after the bus write for the first
  interrupt ack so that it actually synchronizes everything necessary.

  We were acking not only the status update that triggered the interrupt
  together with any status updates that occurred before we got around
  to the bus write for the ack, but also any status updates that occur
  after we do the bus write but before the write reaches the device.
  The corresponding race for the second interrupt ack resulted in
  sometimes returning from the interrupt handler with acked but
  unserviced interrupt events.  Such events then remain unserviced
  until further events cause another interrupt or the watchdog times
  out.

  The race was often lost on my 5705, apparently since my 5705 has broken
  event coalescing which causes a status update for almost every packet,
  so another status update is quite likely to occur while the interrupt
  handler is running.  Watchdog timeouts weren't very noticeable,
  apparently because bge_txeof() has one of the usual bugs resetting the
  watchdog.

- don't disable device interrupts while bge_intr() is running.  Doing this
  just had the side effects of:
  - entering a device mode in which different coalescing parameters apply.
    Different coalescing parameters can be used to either inhibit or
    enhance the chance of getting another status update while in the
    interrupt handler.  This feature is useless with the current
    organization of the interrupt handler but might be useful with a
    taskqueue handler.
  - giving a race for ack+reenable/return.  This cannot be handled
    by simply rearranging the order of bus accesses like the race for
    ack+keepenable/entry.  It is necessary to sync the ack and then
    check for new events.
  - taking longer, especially with the extra code to avoid the race on
    ack+reenable/return.

Reviewed by:	ru, gleb, scottl
2006-12-20 11:14:45 +00:00
..
amd64 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
arm Align the interfaces for the various watchdogs and make the interface 2006-12-15 21:44:49 +00:00
boot add an interface for passing the entire kernel size up front to the 2006-12-18 07:35:14 +00:00
bsm Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events 2006-09-25 12:22:07 +00:00
cam Make cam_xpt's pronouncements match camcontrol 2006-12-10 05:37:48 +00:00
coda change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
compat MFP4: 109653 2006-12-04 22:46:09 +00:00
conf build new mdesc file 2006-12-18 07:26:35 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r165182, 2006-12-13 19:26:37 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Threading cleanup.. part 2 of several. 2006-12-06 06:34:57 +00:00
dev Avoid a race and a pessimization in bge_intr(): 2006-12-20 11:14:45 +00:00
fs For big-endian version of getulong() macro, cast result to u_int32_t. 2006-12-19 02:31:58 +00:00
gdb
geom Softc may be NULL in g_journal_orphan(), so don't be surprised. 2006-12-02 09:10:29 +00:00
gnu Previously, the mount_ext2fs binary listed the acceptable mount 2006-11-18 18:22:11 +00:00
i4b Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
i386 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
ia64 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
isa Optimized RTC accesses by avoiding null writes to the index register 2006-12-03 03:49:28 +00:00
isofs/cd9660 The ISO9660 spec does allow files up to 4G. Change the i_size 2006-12-08 07:43:53 +00:00
kern In rev. 1.514, iodone on async buffer may happen before code checks the 2006-12-20 09:22:31 +00:00
libkern Add strstr() function to the libkern. 2006-08-12 15:28:39 +00:00
modules Remove stall comment. 2006-12-18 18:57:41 +00:00
net MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
net80211 Fix packing on the country band descriptor. No real change since this 2006-12-01 18:40:51 +00:00
netatalk Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph Correctly calculate length of IP header. 2006-12-12 12:35:06 +00:00
netinet o made in kernel libalias mpsafe 2006-12-15 12:50:06 +00:00
netinet6 In ip6_sprintf print the addresses in a more common/readable 2006-12-16 14:15:31 +00:00
netipsec s,#if INET6,#ifdef INET6, 2006-12-14 17:33:46 +00:00
netipx Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netkey With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
netnatm Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client NFSv4 client: 2006-11-28 19:33:28 +00:00
nfsclient NetApp filers return corrupt post op attrs in the wcc on NFS error responses. 2006-12-11 19:54:25 +00:00
nfsserver MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
opencrypto When DIAGNOSTIC is defined, verify if we don't free crypto requests from 2006-06-06 15:04:52 +00:00
pc98 Allow machdep.cpu_idle_hlt to be set from the loader. This should allow 2006-12-06 18:27:17 +00:00
pccard
pci Don't assume IF_LLADDR returns aligned memory address. 2006-12-18 01:38:10 +00:00
powerpc Remove bogus increment of re-hashed PTEG index. This snuck in with r1.12 of 2006-12-20 01:10:21 +00:00
rpc
security Teach the MAC policies which utilize mbuf labeling the new syncache 2006-12-13 06:03:22 +00:00
sparc64 add new large page sizes for use by shared loader 2006-12-18 07:28:59 +00:00
sun4v remove unneeded operations in tsb_set_tte_real - the function is 2006-12-18 07:46:59 +00:00
sys Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
tools Check for errors when registering and unregistering firmware modules. This 2006-06-16 21:06:03 +00:00
ufs change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
vm Optimize vm_object_split(). Specifically, make the number of iterations 2006-12-17 20:14:43 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00