From owner-freebsd-current Mon Jan 6 19:57:20 2003 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 A24EC37B401 for ; Mon, 6 Jan 2003 19:57:19 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id C100E43EB2 for ; Mon, 6 Jan 2003 19:57:18 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id h073vG1e065514; Mon, 6 Jan 2003 20:57:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 06 Jan 2003 20:56:45 -0700 (MST) Message-Id: <20030106.205645.132444987.imp@bsdimp.com> To: nate@root.org Cc: current@FreeBSD.ORG, ryanb@goddamnbastard.org Subject: Re: if_dc.c locking patch From: "M. Warner Losh" In-Reply-To: References: <20030104074914.GS311@goddamnbastard.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Wouldn't it be better if you didn't do the bogus locking in the attach routine? It would be better to not lock at all and not initialize the ISR until last. That's what I did with if_rl. Let's not work around the bogus locking, but insteal eliminate it. There's no way that the driver can interrupt itself until an interrupt happens. If there's no way to interrupt, no locking is needed :-) Also, most of the driver locking that's in the tree is likely bogus anyway, since the network stack still uses giant to a large extent. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message