From owner-freebsd-net@FreeBSD.ORG Fri Apr 24 17:32:17 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 A95261065673 for ; Fri, 24 Apr 2009 17:32:17 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from maste.org (emaste.tor.istop.com [66.11.182.63]) by mx1.freebsd.org (Postfix) with ESMTP id 73B7F8FC22 for ; Fri, 24 Apr 2009 17:32:17 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: by maste.org (Postfix, from userid 1001) id DA2AF21; Fri, 24 Apr 2009 17:42:08 +0000 (UTC) Date: Fri, 24 Apr 2009 17:42:08 +0000 From: Ed Maste To: Barney Cordoba Message-ID: <20090424174208.GA76828@jem.dhs.org> References: <20090423190408.GA65895@jem.dhs.org> <41289.49790.qm@web63906.mail.re1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41289.49790.qm@web63906.mail.re1.yahoo.com> User-Agent: Mutt/1.4.2.1i 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 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2009 17:32:18 -0000 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