diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2019-03-27 03:29:50 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2019-03-27 03:29:50 +0000 |
| commit | a6d2fdfa0f893c6ff00f94d773fd2d427d209020 (patch) | |
| tree | 738dcbe68fd7d189a67fca998dccf130111ae1e5 /sys/dev/microcode | |
| parent | 5810085705388eccf4331a2ceb7019aeefdb894a (diff) | |
Apply OpenBSD rev. 1.94:
> ido 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 deraadt@
Diffstat (limited to 'sys/dev/microcode')
0 files changed, 0 insertions, 0 deletions
