From owner-freebsd-stable@FreeBSD.ORG Tue Dec 2 23:27:29 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D40161065676; Tue, 2 Dec 2008 23:27:29 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 185958FC13; Tue, 2 Dec 2008 23:27:29 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 300CA28450; Wed, 3 Dec 2008 07:27:28 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id B52D7EB89C0; Wed, 3 Dec 2008 07:27:27 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id pkCIhbtswQdk; Wed, 3 Dec 2008 07:27:21 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id ADE93EB4D29; Wed, 3 Dec 2008 07:27:18 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=K3gdpmNp3rNVEy+Ak/Fcsp1lhjtg802EcG7auzYARasg+1HD1NkTMx6wefpjtn3Qn 21kAqQuWMeTeijdvlotdA== Message-ID: <4935C453.8070301@delphij.net> Date: Tue, 02 Dec 2008 15:27:15 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: geoffroy desvernay References: <4935069A.8060209@ec-marseille.fr> <49357BD0.4000008@delphij.net> <4935944A.9090509@ec-marseille.fr> In-Reply-To: <4935944A.9090509@ec-marseille.fr> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------010001060603010607030506" Cc: Mike Jakubik , d@delphij.net, freebsd-stable@freebsd.org, demon@FreeBSD.ORG Subject: Re: RELENG_7_1: bce driver change generating too much interrupts ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 23:27:29 -0000 This is a multi-part message in MIME format. --------------010001060603010607030506 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Here is a patch that adjusts parameters of the interrupt handler, which reduces interrupts. These parameters are obtained from DragonFly, FYI. Note that this does not restore previous behavior, say, few interrupt if no traffic. I'm still looking into the real cause. geoffroy desvernay wrote: > Xin LI a écrit : >> Can anyone try reverting the changeset itself? There are two recent >> changesets: >> >> http://www.delphij.net/bce-185161.diff.bz2 >> http://www.delphij.net/bce-184826.diff.bz2 >> >> You can revert the change by doing this: >> >> cd /usr/src >> fetch http://www.delphij.net/bce-185161.diff.bz2 >> fetch http://www.delphij.net/bce-184826.diff.bz2 >> bzcat bce-185161.diff.bz2 | patch -R >> bzcat bce-184826.diff.bz2 | patch -R >> >> I'll check what's happening ASAP. >> > Done: > > I'd say it seems to be related... > > Before applying your patches: > # vmstat -i > interrupt total rate > irq1: atkbd0 18 0 > irq14: ata0 58 0 > irq20: uhci1 96 0 > irq21: uhci0 uhci+ 5 0 > irq78: mfi0 539747 3 > cpu0: timer 350029937 1999 > irq256: bce0 6757905080 38611 > irq259: bce1 8296789513 47403 > cpu1: timer 350029945 1999 > cpu2: timer 350030010 1999 > cpu3: timer 350030025 1999 > Total 16455354434 94018 > > > After patch, make buildkernel && make reinstallkernel and reboot > interrupt total rate > irq1: atkbd0 18 0 > irq14: ata0 58 0 > irq20: uhci1 2 0 > irq21: uhci0 uhci+ 5 0 > irq78: mfi0 3947 24 > cpu0: timer 320361 1989 > irq256: bce0 6658 41 > irq259: bce1 1428 8 > cpu1: timer 320320 1989 > cpu2: timer 320380 1989 > cpu3: timer 320507 1990 > Total 1293684 8035 > - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk1xFMACgkQi+vbBBjt66DgRwCfRTItoRYMYtyWywXfa4arKl8n +usAoLUBSnifVZhK5wmENCpOAngI10WB =tLQJ -----END PGP SIGNATURE----- --------------010001060603010607030506 Content-Type: text/plain; name="bce-intrcoll-parameters.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bce-intrcoll-parameters.diff" --- if_bce.c 2008-12-02 14:02:30.078918595 -0800 +++ .#if_bce.c.1.34.2.3.2.1 2008-12-02 13:49:07.000000000 -0800 @@ -925,15 +925,15 @@ sc->bce_rx_ticks = 0; #else /* Improve throughput at the expense of increased latency. */ - sc->bce_tx_quick_cons_trip_int = 20; - sc->bce_tx_quick_cons_trip = 20; - sc->bce_tx_ticks_int = 80; - sc->bce_tx_ticks = 80; - - sc->bce_rx_quick_cons_trip_int = 6; - sc->bce_rx_quick_cons_trip = 6; - sc->bce_rx_ticks_int = 18; - sc->bce_rx_ticks = 18; + sc->bce_tx_quick_cons_trip_int = 255; + sc->bce_tx_quick_cons_trip = 255; + sc->bce_tx_ticks_int = 1022; + sc->bce_tx_ticks = 1022; + + sc->bce_rx_quick_cons_trip_int = 128; + sc->bce_rx_quick_cons_trip = 128; + sc->bce_rx_ticks_int = 125; + sc->bce_rx_ticks = 125; #endif /* Update statistics once every second. */ @@ -2555,7 +2555,7 @@ } else if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - if (sc->bce_phy_flags && BCE_PHY_SERDES_FLAG) { + if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { sc->bce_flags |= BCE_NO_WOL_FLAG; if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { sc->bce_phy_addr = 2; --------------010001060603010607030506--