freebsd-skq/sys/pci
Pyun YongHyeon 0759386405 Rewrite interrupt handler to give fairness for both RX and TX.
Previously rl(4) continuously checked whether there are RX events
or TX completions in forever loop. This caused TX starvation under
high RX load as well as consuming too much CPU cycles in the
interrupt handler. If interrupt was shared with other devices which
may be always true due to USB devices in these days, rl(4) also
tried to process the interrupt. This means polling(4) was the only
way to mitigate the these issues.

To address these issues, rl(4) now disables interrupts when it
knows the interrupt is ours and limit the number of iteration of
the loop to 16. The interrupt would be enabled again before exiting
interrupt handler if the driver is still running. Because RX buffer
is 64KB in size, the number of iterations in the loop has nothing
to do with number of RX packets being processed. This change
ensures sending TX frames under high RX load.

RX handler drops a driver lock to pass received frames to upper
stack such that there is a window that user can down the interface.
So rl(4) now checks whether driver is still running before serving
RX or TX completion in the loop.

While I'm here, exit interrupt handler when driver initialized
controller.

With this change, now rl(4) can send frames under high RX load even
though the TX performance is still not good(rl(4) controllers can't
queue more than 4 frames at a time so low TX performance was one of
design issue of rl(4) controllers). It's much better than previous
TX starvation and you should not notice RX performance drop with
this change. Controller still shows poor performance under high
network load but for many cases it's now usable without resorting
to polling(4).

MFC after:	2 weeks
2010-10-13 17:55:19 +00:00
..
alpm.c
amdpm.c - Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle 2008-06-06 18:29:56 +00:00
amdsmb.c - Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle 2008-06-06 18:29:56 +00:00
if_rl.c Rewrite interrupt handler to give fairness for both RX and TX. 2010-10-13 17:55:19 +00:00
if_rlreg.h Consistently use capital letters. 2010-04-09 23:00:24 +00:00
intpm.c intpm/sb700: force polling mode if configured interrupt is SMI 2009-09-19 08:56:28 +00:00
intpmreg.h intpm: add support for smbus controller found in AMD SB700 2009-09-12 18:24:31 +00:00
locate.pl
ncr.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
ncrreg.h
nfsmb.c Add support for four more nfsmb controllers, shipping on at least the 2010-01-24 14:57:54 +00:00
viapm.c The callback takes a void *, not a caddr_t * (sic). 2009-03-03 18:54:57 +00:00