Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 2008 14:50:42 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/ufs/ffs ffs_vnops.c
Message-ID:  <20080321125042.GU10374@deviant.kiev.zoral.com.ua>
In-Reply-To: <20080321024123.P910@desktop>
References:  <200803211233.m2LCX1Bm099652@repoman.freebsd.org> <20080321024123.P910@desktop>

next in thread | previous in thread | raw e-mail | index | archive | help

--XQjj8pZWZgZH7jIp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 exclusiv=
e=20
> vnode lock and the vnode interlock when clearing.  The exclusive node loc=
k=20
We may hold only the shared vnode lock and the interlock when clearing,
in the ufs_itimes().

> 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 handle=
d=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
> 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
> >

--XQjj8pZWZgZH7jIp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iEYEARECAAYFAkfjryEACgkQC3+MBN1Mb4g30gCdGd/A6EpvJbh7AkRTO2CTwO9A
RpYAoPdV5Rylxa89yArpBdTxgilOlUop
=dhol
-----END PGP SIGNATURE-----

--XQjj8pZWZgZH7jIp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080321125042.GU10374>