From owner-freebsd-net@FreeBSD.ORG Sat Apr 25 13:33:16 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21EB61065672 for ; Sat, 25 Apr 2009 13:33:16 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63904.mail.re1.yahoo.com (web63904.mail.re1.yahoo.com [69.147.97.119]) by mx1.freebsd.org (Postfix) with SMTP id CD7758FC1B for ; Sat, 25 Apr 2009 13:33:15 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 83697 invoked by uid 60001); 25 Apr 2009 13:33:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1240666395; bh=UJ5f15wZqgwy9f6vpTUpi3zaZ325I2GeTX5B1aeUgi4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=E3kTLHUoAHf0PPGqwlxfbsajx44navFel38GOaWiZE71R60CqfJxuhVgWPWEILT8ovJ5Mg5e9YA+9Au6c/6FzaY8GQmV+f31536pphqJKaqWwWV3SaqfeL0T1OpH8OLkkraf+POJxK4CjgU6+IKOU/Iu3z9JRWhhqZOlWqGJFeA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=JQU+wwHMTDWWiAsbbDCScd8HNqYojDorX7ckN88TFlNYLmRIswfeWivtr8NfVQCvqqhYT4Jyi/FxoT4zoe1HjqczvsWr9oNSXpyOCkshuEDBHz5zaz1ivkbwd5w3Fa7+7f/xnAWiQnKtB26fq09zeMgokhxk0QWsvFvOyRxKnh8=; Message-ID: <160513.83122.qm@web63904.mail.re1.yahoo.com> X-YMail-OSG: nYap4CkVM1lr75isSGa8eGg3Kj_j.khrtHZcznNxEX.XXHXJo1GqMowwQXChLCukUlisUwTs2aw84iTJb_wLNvKiKCXKEGylYukYkUoJC8SFQtK2DPtTfzO_kiouvGvlnzFfK4X3YQccDFe7aYBnXMsnR4DS.SFpGCcVnGccyCf6bP6Ksm8NNacwexezTjdojYvenc1Iyn9o5lpXfzb_J0Hzrqdn2VyUB6bOGDfC1orgfi_Y81H3FdvugGaEAkNdjr0LnKYH.HCH2hVi7lcnK0n8e5nzekjzX5Ss8WO5pfZyTemQpURqRmZxNiBedQ5u3Q50a3bB_uYnHCs- Received: from [98.242.223.106] by web63904.mail.re1.yahoo.com via HTTP; Sat, 25 Apr 2009 06:33:15 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Sat, 25 Apr 2009 06:33:15 -0700 (PDT) From: Barney Cordoba To: Ed Maste In-Reply-To: <20090424174208.GA76828@jem.dhs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-net@freebsd.org Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: barney_cordoba@yahoo.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2009 13:33:16 -0000 --- On Fri, 4/24/09, Ed Maste wrote: > From: Ed Maste > Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI) > To: "Barney Cordoba" > 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