From owner-cvs-all@FreeBSD.ORG Fri Mar 21 12:43:40 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24C8F106564A; Fri, 21 Mar 2008 12:43:40 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id E4CC18FC16; Fri, 21 Mar 2008 12:43:39 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.107] (cpe-24-94-75-93.hawaii.res.rr.com [24.94.75.93]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id m2LChYvc074077; Fri, 21 Mar 2008 08:43:35 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Fri, 21 Mar 2008 02:44:39 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Konstantin Belousov In-Reply-To: <200803211233.m2LCX1Bm099652@repoman.freebsd.org> Message-ID: <20080321024123.P910@desktop> References: <200803211233.m2LCX1Bm099652@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_vnops.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: Fri, 21 Mar 2008 12:43:40 -0000 On Fri, 21 Mar 2008, Konstantin Belousov wrote: > kib 2008-03-21 12:33:00 UTC > > FreeBSD src repository > > Modified files: > sys/ufs/ffs ffs_vnops.c > Log: > Reduce the acquisition of the vnode interlock in the ffs_read() and > ffs_extread() when setting the IN_ACCESS flag by checking whether the > IN_ACCESS is already set. The possible race there is admissible. I don't believe there is a race because we should always hold an exclusive vnode lock and the vnode interlock when clearing. The exclusive node lock would prevent ffs_read() from executing entirely, so we don't have to worry about races with clearing the bit. Races to set the bit are handled by the vnode interlock. I should also mention that while this may seem innocuous enough this figured heavily in LOCK_PROFILING for a real workload. Thanks, Jeff > > Tested by: pho > Submitted by: jeff > > Revision Changes Path > 1.180 +4 -2 src/sys/ufs/ffs/ffs_vnops.c >