diff options
author | 2011-04-14 06:27:52 +0000 | |
---|---|---|
committer | 2011-04-14 06:27:52 +0000 | |
commit | 61e4c63ea0d544a39877ce4434cae0be2d30acd1 (patch) | |
tree | e21ae731ab138e788e8d3776500c6766d4058344 /sys/lib/libkern | |
parent | knf. remove extra spaces and wrap long lines. (diff) | |
download | wireguard-openbsd-61e4c63ea0d544a39877ce4434cae0be2d30acd1.tar.xz wireguard-openbsd-61e4c63ea0d544a39877ce4434cae0be2d30acd1.zip |
do not disable interrupts in the isr and then enable them again
when leaving. when you're handling an interrupt it is masked.
whacking the chip is work for no gain.
modify the interrupt handler so it only processes the rings once,
rather than looping over them until it runs out of work to do.
looping in the isr is bad for several reasons:
firstly, the chip does interrupt mitigation so you have a
decent/predictable amount of work to do in the isr. your first loop
will do that chunk of work (ie, it pulls off 50ish packets), and
then the successive looping aggressively pull one or two packets
off the rx ring. these extra loops work against the benefit that
interrupt mitigation provides.
bus space reads are slow. we should avoid doing them where possible
(but we should always do them when necessary).
doing the loop 5 times per isr works against the mclgeti semantics.
it knows a nic is busy and therefore needs more rx descriptors by
watching to see when the nic uses all of its descriptors between
interrupts. if we're aggressively pulling packets off by looping
in the isr then we're skewing this check.
ok henning@ krw@
testing by sthen@
Diffstat (limited to 'sys/lib/libkern')
0 files changed, 0 insertions, 0 deletions