From owner-cvs-all@FreeBSD.ORG Tue Sep 20 21:31:15 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4342216A41F; Tue, 20 Sep 2005 21:31:15 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2F7143D46; Tue, 20 Sep 2005 21:31:14 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 3FFE246B4F; Tue, 20 Sep 2005 17:31:14 -0400 (EDT) Date: Tue, 20 Sep 2005 22:31:14 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200509201551.11396.jhb@FreeBSD.org> Message-ID: <20050920222930.N34322@fledge.watson.org> References: <200509190310.j8J3ALgt095979@repoman.freebsd.org> <20050919055028.GC65954@ip.net.ua> <20050919.083146.105425670.imp@bsdimp.com> <200509201551.11396.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, ru@FreeBSD.org, cvs-all@FreeBSD.org, "M. Warner Losh" Subject: Re: cvs commit: src/sys/dev/an if_an.c src/sys/dev/arl if_arl_isa.c src/sys/dev/awi if_awi_pccard.c src/sys/dev/cm if_cm_isa.c src/sys/dev/cnw if_cnw.c src/sys/dev/cp if_cp.c src/sys/dev/cs if_cs.c src/sys/dev/ed if_ed.c src/sys/dev/em if_em.c ... 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: Tue, 20 Sep 2005 21:31:15 -0000 On Tue, 20 Sep 2005, John Baldwin wrote: > Regarding other comments I saw today on some e-mail or another, I do > think that to make the locking sane, we might should push the checks for > IFF_DRV_RUNNING down into the foo_start() routines rather than doing it > in the network layer where the driver lock isn't held. This was a change I was thinking of trying to get into 6.0 a few weeks ago, but was worried that wholesale frobbing of the network interface drivers would introduce too many bugs. Also, it will increase the cost of injecting packets into the send queue under load as you'll always have to acquire and drop the driver mutex to test the flag. I.e., it's not clear we're actually racing, but we might pay a hefty cost for fixing it. If you want to take a cut at it, I'm happy to help characterize the cost and decide if it's the right thing to do. It would be nice to get it into 6.0 if possible as it will become part of the device driver API if so. Robert N M Watson