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

Barney Cordoba barney_cordoba at yahoo.com
Sat Apr 25 13:33:16 UTC 2009





--- On Fri, 4/24/09, Ed Maste <emaste at freebsd.org> wrote:

> From: Ed Maste <emaste at freebsd.org>
> Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI)
> To: "Barney Cordoba" <barney_cordoba at yahoo.com>
> Cc: freebsd-net at freebsd.org
> Date: Friday, April 24, 2009, 1:42 PM
> 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.
> 
> -Ed

"highest performance" measured in what way, and in comparision
to what set of moderation controls?

Did your "tests" consider that polling implements a direct method
of managing the NIC while interrupts use the highly questionable
method of launching tasks?

If you didn't test against interrupt methods that manage the NIC in
the same way then you've compared apples to oranges. The proper way
to do it would be to have your interrupt routine call the polling
function (ie using the moderated interrupt to initiate the poll).

Barney


      


More information about the freebsd-net mailing list