cvs commit: src/sys/kern kern_prot.c vfs_export.c src/sys/nfsserver nfs_srvsock.c nfs_srvsubs.c src/sys/sys ucred.h src/sys/ufs/ufs ufs_vnops.c

John Baldwin jhb at FreeBSD.org
Wed Sep 28 10:24:00 PDT 2005


On Wednesday 28 September 2005 05:16 am, Jeremie Le Hen wrote:
> Hi John,
>
> > jhb         2005-09-27 18:09:42 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/kern             kern_prot.c vfs_export.c
> >     sys/nfsserver        nfs_srvsock.c nfs_srvsubs.c
> >     sys/sys              ucred.h
> >     sys/ufs/ufs          ufs_vnops.c
> >   Log:
> >   Use the refcount API to manage the reference count for user credentials
> >   rather than using pool mutexes.
>
> Regarding your great job on atomic operations and the modification you
> made on process argument and process limit structures as well as
> user credentials, I wonder if you managed to get some figures
> illustrating the improvement.

No, I didn't run any before/after benchmarks, just stability tests to make 
sure I didn't break anything.  I'm pretty sure 2 atomic operations aren't 
cheaper than just 1 though.  However, on some archs (ppc and ia64 currently) 
there might be a penalty in the edge case where the atomic_cmpset loop races 
and has to do more than one atomic_cmpset.  However, in that case it would 
have had to contest on the mutex anyways, so even then I still think it would 
be a win.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list