Lockless uidinfo.
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Aug 18 08:01:31 PDT 2007
On Sat, Aug 18, 2007 at 07:23:37AM -0700, Alfred Perlstein wrote:
> * Pawel Jakub Dawidek <pjd at FreeBSD.org> [070818 05:31] wrote:
> > Hi.
> >
> > The patch below remove per-uidinfo locks:
> >
> > http://people.freebsd.org/~pjd/patches/uidinfo_lockless.patch
>
> In uifree() is it ok to manually check the refcount for 0?
>
> 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.
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20070818/59f1d397/attachment.pgp
More information about the freebsd-arch
mailing list