From owner-cvs-src@FreeBSD.ORG Fri Mar 21 12:54:24 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71727106566C; Fri, 21 Mar 2008 12:54:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6088FC15; Fri, 21 Mar 2008 12:54:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay03.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JcglF-000H7r-VJ; Fri, 21 Mar 2008 14:54:23 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2LCrgSs027550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Mar 2008 14:53:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2LCrVZj090545; Fri, 21 Mar 2008 14:53:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m2LCrTww090544; Fri, 21 Mar 2008 14:53:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Mar 2008 14:53:29 +0200 From: Kostik Belousov To: Jeff Roberson Message-ID: <20080321125329.GV10374@deviant.kiev.zoral.com.ua> References: <200803211233.m2LCX1Bm099652@repoman.freebsd.org> <20080321024123.P910@desktop> <20080321125042.GU10374@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y+bLae2mFylWGq1m" Content-Disposition: inline In-Reply-To: <20080321125042.GU10374@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 3f6c5f504711b4b2e39067d20b60c9d6 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2452 [Mar 21 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Method: none X-SpamTest-Rate: 9 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release 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-src@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 21 Mar 2008 12:54:24 -0000 --y+bLae2mFylWGq1m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 21, 2008 at 02:50:42PM +0200, Kostik Belousov wrote: > On Fri, Mar 21, 2008 at 02:44:39AM -1000, Jeff Roberson wrote: > > On Fri, 21 Mar 2008, Konstantin Belousov wrote: > >=20 > > >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. > >=20 > > I don't believe there is a race because we should always hold an exclus= ive=20 > > vnode lock and the vnode interlock when clearing. The exclusive node l= ock=20 > We may hold only the shared vnode lock and the interlock when clearing, > in the ufs_itimes(). Forgot to note that example of the ufs_itimes() call while holding only the shared vnode lock is the ufs_getattr(). >=20 > > would prevent ffs_read() from executing entirely, so we don't have to= =20 > > worry about races with clearing the bit. Races to set the bit are hand= led=20 > > by the vnode interlock. > Yes, the race I meant is the clearing of the IN_ACCESS while performing > unlocked read for check. It may be considered as a race, may be not. >=20 > >=20 > > I should also mention that while this may seem innocuous enough this=20 > > figured heavily in LOCK_PROFILING for a real workload. > >=20 > > Thanks, > > Jeff > >=20 > > > > > > Tested by: pho > > > Submitted by: jeff > > > > > > Revision Changes Path > > > 1.180 +4 -2 src/sys/ufs/ffs/ffs_vnops.c > > > --y+bLae2mFylWGq1m Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEUEARECAAYFAkfjr8kACgkQC3+MBN1Mb4iKdwCTBgxChDKYkl5XdRzq4FCn0Asx pQCgzXmFrUIyFqdrgN61NlFoM00bxow= =0lLd -----END PGP SIGNATURE----- --y+bLae2mFylWGq1m--