PERFORCE change 100686 for review

Maxime Henrion mux at FreeBSD.org
Thu Jul 6 08:40:30 UTC 2006


Scott Long wrote:
> http://perforce.freebsd.org/chv.cgi?CH=100686
> 
> Change 100686 by scottl at scottl-wv1u on 2006/07/06 03:47:59
> 
> 	Use a sleep mutex to protect kernel environment handling instead of
> 	an sx lock.  The sx lock seemed to only be used to get around the
> 	copyout case in kenv(KENV_DUMP) path.  Fix that path to safely use a
> 	sleep lock instead.

Actually, the sx lock was not used for that but simply for the usual
reason we use sx locks: to allow multiple readers to read the kernel
environment in parallel.  This is just FYI, I don't mind you changing
it to a mutex, since kenv() is quite rarely used and it probably doesn't
benefit much from the sx lock (it may even get pessimized by it).

Cheers,
Maxime


More information about the p4-projects mailing list