Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Aug 2007 17:00:28 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Lockless uidinfo.
Message-ID:  <20070818150028.GD6498@garage.freebsd.pl>
In-Reply-To: <20070818142337.GW90381@elvis.mu.org>
References:  <20070818120056.GA6498@garage.freebsd.pl> <20070818142337.GW90381@elvis.mu.org>

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

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

On Sat, Aug 18, 2007 at 07:23:37AM -0700, Alfred Perlstein wrote:
> * Pawel Jakub Dawidek <pjd@FreeBSD.org> [070818 05:31] wrote:
> > Hi.
> >=20
> > The patch below remove per-uidinfo locks:
> >=20
> > 	http://people.freebsd.org/~pjd/patches/uidinfo_lockless.patch
>=20
> In uifree() is it ok to manually check the refcount for 0?
>=20
> I'm gussing the hashmtx is used as a barrier?

Yes, to lookup uidinfo you need to hold uihashtbl_mtx mutex, so once you
hold it and ui_ref is 0, noone will be able to reference it, because it
has to wait to look it up.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFGxwmMForvXbEpPzQRAij1AKD39VFS9BweDqwgf9MRFZ9roIOxGQCgkPvW
ekGd4bRXzvLa6EpgqnPzcaE=
=PYJc
-----END PGP SIGNATURE-----

--sgneBHv3152wZ8jf--



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