Interrupts + Polling mode (similar to Linux's NAPI)
emaste at freebsd.org
Fri Apr 24 17:32:18 UTC 2009
On Fri, Apr 24, 2009 at 08:03:52AM -0700, Barney Cordoba wrote:
> Actually, the "advantage of using interrupts" is to have a per
> NIC control without having all of the extra code to implement
> polling. Using variable interrupt moderation is much more desirable
> and efficient, so polling is only useful for legacy NICs with no
> controls on interrupt delays.
I'm aware of the advantages and tradeoffs of the various approaches,
and the shortcomings of our current polling infrastructure, probably
the greatest of which is the lack of any parallelism. That said, in
testing some time ago polling with the modifications I alluded to in
my email, using em(4), gave the highest throughput of all approaches.
(At the expence of latency, as expected.)
In addition, having a standardized polling interface allows for use of
the interface when the system is not fully running -- network
crashdumps, for instance.
We can certainly use improvements in the polling infrastructure though,
at least allowing it to properly take advantage of SMP. The KPI change
proposed here is to allow some of those improvements, should they
happen, to be MFC'd to 8.
More information about the freebsd-net