From owner-cvs-all@FreeBSD.ORG Wed Dec 6 17:37:23 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6C9516A5AE; Wed, 6 Dec 2006 17:37:23 +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 ECF0B43FC9; Wed, 6 Dec 2006 17:33:07 +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 kB6HWGGm074034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Dec 2006 20:32:17 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id kB6HWBxB074033; Wed, 6 Dec 2006 20:32:11 +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 20:32:10 +0300 From: Gleb Smirnoff To: Sam Leffler Message-ID: <20061206173210.GR32700@FreeBSD.org> References: <200612060218.kB62IfVn046324@repoman.freebsd.org> <20061206164242.A32496@delplex.bde.org> <20061206154555.GM32700@FreeBSD.org> <4576F9F7.9090503@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4576F9F7.9090503@errno.com> User-Agent: Mutt/1.5.6i Cc: cvs-src@FreeBSD.org, Marius Strobl , src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans Subject: Re: cvs commit: src/sys/pci if_xl.c if_xlreg.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2006 17:37:24 -0000 On Wed, Dec 06, 2006 at 09:12:23AM -0800, Sam Leffler wrote: S> > On Wed, Dec 06, 2006 at 06:01:48PM +1100, Bruce Evans wrote: S> > B> It's a shame to force all NIC drivers to manage the timeout for this. S> > B> Most have a timeout for other purposes so I couldn't see how to save S> > B> much code using a callback, but a callback would be cleaner. (To avoid S> > B> the race, just move the decrement of the count to drivers.) S> > S> > It is a shame to have a two extra fields in struct ifnet, just for S> > the sake of the drivers that can wedge. It is a shame to go through S> > the whole list of interfaces every second. S> > S> > There are routers with few NICs and dozens of vlan(4) interfaces. There S> > are also PPP concentrators with up to thousand interfaces and only S> > one NIC that really needs to have its watchdog. S> S> I agree with both sentiments and as the originator of the ifnet watchdog S> mechanism I can only say that it's high time it was replaced by S> something better. My main worry with this change is that people will S> _blindly_ sweep drivers replacing what was previously a fairly S> lightweight mechanism with something much more expensive. I have thought a little bit about this. Even in case if every interface in system schedules its own watchdog, a search through the list of scheduled callouts isn't worse than going through the list of all interfaces, as we have now. And it is locked finer, since doesn't holds the IFNET_RLOCK, just holds the mutex of current callwheel slot. Since most drivers already have periodic (usually 1 sec) callouts, piggybacking on them will not increase number of scheduled callouts. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE