Interrupts + Polling mode (similar to Linux's NAPI)

Luigi Rizzo rizzo at iet.unipi.it
Tue Apr 28 15:02:29 UTC 2009


On Tue, Apr 28, 2009 at 07:26:40AM -0700, Barney Cordoba wrote:
...
> The problem with all of this "analysis" is that it assumes that SMP
> coding scales intuitively; when the opposite is actually true. 
> 
> What you fail to address is the basic fact that moderated interrupts
> (ie holding off interrupts to a set number of ints/second) is exactly
> the same as polling, as on an active system you'll get exactly X
> interrupts per second at equal intervals. So all of this chatter about
> polling being more efficient is simply bunk.
> 
> The truth is that polling requires additional overhead to the system while
> interrupts do not. So if polling did better for you, its simply because 
> either 
> 
> 1)  The polling code in the driver is better
> 
> or
> 
> 2) You tuned polling better than you tuned interrupt moderation.
> 

If i am not mistaken we don't have generic support for interrupt moderation
in the kernel but that's a specific NIC feature: it works if the
hardware supports it, and it doesn't otherwise.

Of course it would be possible to modify polling to implement
generic interrupt mitigation even without hardware support, so
you get the best of the two worlds.

cheers
luigi


More information about the freebsd-net mailing list