From owner-freebsd-net@FreeBSD.ORG Wed Dec 6 08:55:46 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E04EB16A417; Wed, 6 Dec 2006 08:55:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 926B243DCA; Wed, 6 Dec 2006 08:53:25 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id kB68s2eF070132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Dec 2006 11:54:02 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id kB68s1F7070131; Wed, 6 Dec 2006 11:54:01 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Wed, 6 Dec 2006 11:54:01 +0300 From: Gleb Smirnoff To: oleg@freebsd.org, net@freebsd.org Message-ID: <20061206085401.GH32700@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i Cc: MQ Subject: [antinvidia@gmail.com: some questions about bge(4)] 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: Wed, 06 Dec 2006 08:55:47 -0000 Forwarding to net@ list and to Oleg, who has made polling support for bge(4). ----- Forwarded message from MQ ----- From: MQ To: glebius@freebsd.org, davidch@broadcom.com Subject: some questions about bge(4) Date: Sat, 2 Dec 2006 09:32:27 +0000 Delivered-To: glebius@freebsd.org DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=ZL3ZZ1zR0mt4LaUN2Rr+jXTPSzQgJYRwLiwKnv95r2UCEids5Wl7oA2BNgicJ2QRG8OalJ7DqY7lM1HBgv0OVTlXOhGQ9aFmKQAuTNi6ueZA817XUacXyViEepnj0oNyYgAnkbaaBO1+nl2Fpb3IxV+MIe575WRlqbglF8kdOek= Hi David and Gleb, I'm using several chips whose driver is bge(4). And now I have some questions about the driver, would you please an answer for me? My confusion is related with some codes in /sys/dev/mii/brgphy.c. The bge(4) uses the callout to drive the watchdog. And the brgphy_service() is called once per second. It calls brgphy_mii_phy_auto() every 5 seconds to autonegotiate the media. Normally, it costs about 0.5ms in the first function brgphy_service(), and about 5ms when autonegotiation is proceeded. I haven't done streestest on it, consequently I don't know if this delay will cause packets to be dropped. But I've enabled device polling with the bge(4) on FreeBSD 6.1-RELEASE. If HZ is set to a high value(e.g. 4000), this delay will cause the kern.polling.lost_polls to increase by one or two every second. And for about five seconds, the lost poll will increase by at least 16 regularly. So I think this behavior has some impact on the systems that enables device polling. Could we get something to make the bge(4) a bit more friendly to the device polling? I don't know if autonegotiation is really needed to be called so frequently when we are connected to a good network environment. Can I modify the interval between two autonegotiations to have less lost_polls? However, I have no idea about the long time spent in the brgphy_service(), please take a look at the problem when you have enough time. Regards MQ ----- End forwarded message ----- -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE