Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2009 06:33:15 -0700 (PDT)
From:      Barney Cordoba <barney_cordoba@yahoo.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Interrupts + Polling mode (similar to Linux's NAPI)
Message-ID:  <160513.83122.qm@web63904.mail.re1.yahoo.com>
In-Reply-To: <20090424174208.GA76828@jem.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help




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

> From: Ed Maste <emaste@freebsd.org>
> Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI)
> To: "Barney Cordoba" <barney_cordoba@yahoo.com>
> Cc: freebsd-net@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


      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?160513.83122.qm>