From owner-freebsd-arch@FreeBSD.ORG Sat Aug 18 15:01:31 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEC5916A418; Sat, 18 Aug 2007 15:01:31 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 22F4D13C48E; Sat, 18 Aug 2007 15:01:31 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 20A504569A; Sat, 18 Aug 2007 17:01:30 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 0B67245696; Sat, 18 Aug 2007 17:01:25 +0200 (CEST) Date: Sat, 18 Aug 2007 17:00:28 +0200 From: Pawel Jakub Dawidek To: Alfred Perlstein Message-ID: <20070818150028.GD6498@garage.freebsd.pl> References: <20070818120056.GA6498@garage.freebsd.pl> <20070818142337.GW90381@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sgneBHv3152wZ8jf" Content-Disposition: inline In-Reply-To: <20070818142337.GW90381@elvis.mu.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-arch@FreeBSD.org Subject: Re: Lockless uidinfo. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2007 15:01:31 -0000 --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 [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--