From owner-cvs-src@FreeBSD.ORG Thu Aug 5 03:02:46 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 58F1D16A4CE; Thu, 5 Aug 2004 03:02:46 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i7532jEo061439; Wed, 4 Aug 2004 23:02:45 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i7532jMs061438; Wed, 4 Aug 2004 23:02:45 -0400 (EDT) (envelope-from green) Date: Wed, 4 Aug 2004 23:02:44 -0400 From: Brian Fundakowski Feldman To: Robert Watson Message-ID: <20040805030244.GB58239@green.homeunix.org> References: <200408050237.i752baAT049513@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408050237.i752baAT049513@repoman.freebsd.org> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net bpf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 03:02:46 -0000 On Thu, Aug 05, 2004 at 02:37:36AM +0000, Robert Watson wrote: > rwatson 2004-08-05 02:37:36 UTC > > FreeBSD src repository > > Modified files: > sys/net bpf.c > Log: > Do a lockless read of the BPF interface structure descriptor list head > before grabbing BPF locks to see if there are any entries in order to > avoid the cost of locking if there aren't any. Avoids a mutex lock/ > unlock for each packet received if there are no BPF listeners. While you're there, do you want to check out the other problems I've been noticing, relating to consistency/locking? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\