From owner-freebsd-current@FreeBSD.ORG Sun Nov 21 22:45:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3025B16A4CE for ; Sun, 21 Nov 2004 22:45:03 +0000 (GMT) Received: from corwin.easynet.fr (smarthost160.mail.easynet.fr [212.180.1.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 205AF43D49 for ; Sun, 21 Nov 2004 22:45:02 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from [212.180.127.72] (helo=tatooine.tataz.chchile.org) by corwin.easynet.fr with esmtp (Exim 4.34) id 1CW0S1-0007rV-Cd; Sun, 21 Nov 2004 23:44:58 +0100 Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 0AC1B408E; Sun, 21 Nov 2004 23:44:47 +0100 (CET) Date: Sun, 21 Nov 2004 23:44:46 +0100 From: Jeremie Le Hen To: "Bjoern A. Zeeb" Message-ID: <20041121224446.GT69710@obiwan.tataz.chchile.org> References: <20041119114233.C43B.SHINO@fornext.org> <20041119185315.C43D.SHINO@fornext.org> <20041119120102.GM69710@obiwan.tataz.chchile.org> <20041121020050.GB94473@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Broken-Reverse-DNS: no host name found for IP address 212.180.127.72 cc: Jeremie Le Hen cc: freebsd-current@freebsd.org cc: Dan Nelson cc: Shunsuke SHINOMIYA Subject: Re: interrupt moderation for if_* [was: serious networking (em) ...] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 22:45:03 -0000 > > > when thinking about this could there be some "global" way for > > > interrupt moderation; For if_sk there is this PR: > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/41220 > > > > > > something 'unique' to all NIC drivers would be good I guess ? > > > > You need NIC support for it, just like checksum offloading. And other > > good example;) We do have [-,]{rxcsum, txcsum} in ifconfig for > turning this on/off if supported. > > What I meant is to have common names for the interface (sysctl) for > all NICs supporting this - "on grep finds all" and not to start > home-brewed names for each driver. > > There might be some different names needed because int_delay, > int_throttle_ceil or sk_interrupt_mod might or might not achieve the > same but if they do names should be same. This is a great idea, it would be very user-friendly to have such a flag in ifconfig(8) but there is a non-trivial problem to achieve this. Although the Interrupt Moderation implementation among theses chipsets is based on the same principle, the way we can control its behaviour diverges very much. o sk(4) cards have this feature, but according to the product white paper [1] and the Linux sk98lin(4) driver manual page [2], there are two Interrupt Moderation modes (the static one and dynamic one), but we may only adjust the maximum interrupts per seconds. Note that, as far as I understood, both the "Moderation" and the "IntsPerSec" may be set at run-time. o fxp(4) cards have what is called "CPU cycle saver" which also gathers multiple packets before generating an interrupt. There are two parameters to control the behaviour of this feature : maximum delay and maximum number of packets to be bundled before generating the interrupt [3]. These parameters may be changed only by loading a microcode into the chip, run-time modification is impossible. o em(4) have the most flexible configuration scheme for Interrupt Moderation, IHMO. You may set the absolute timer and the packet timer as well as the interrupt throttle ceil which is the origin of this subthread [4]. I didn't manage to know whether these may be set at run-time, but I assume it's possible. What I tried to demonstrate is that it does not seem to be possible to find a common denominator for configurable parameters of this feature. Furthermore it appears that some chips may be configured at run-time while others requires uploading a microcode, it would be harm to restrict the formers to fit with the latters capacities. [1] http://www.syskonnect.com/syskonnect/technology/SK-NET_GE.PDF (see section 3.2.1) [2] http://www.frech.ch/man/man4/sk98lin.4.html (see "Moderation" and "IntsPerSec" parameters) [3] http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/fxp/if_fxpvar.h?rev=1.32&content-type=text/x-cvsweb-markup (see TUNABLE_INT_DELAY and TUNABLE_BUNDLE_MAX defines) [4] http://www.intel.com/design/network/applnots/ap450.pdf Best regards, -- Jeremie Le Hen jeremie@le-hen.org