svn commit: r211738 -
head/sys/cddl/contrib/opensolaris/uts/common/dtrace
Kostik Belousov
kostikbel at gmail.com
Tue Aug 24 12:05:40 UTC 2010
On Tue, Aug 24, 2010 at 12:59:30PM +0100, Rui Paulo wrote:
>
> On 24 Aug 2010, at 12:48, Kostik Belousov wrote:
> >> +#if defined(sun)
> >> for (i = 0; i < NCPU; i++) {
> >> mutex_enter(&cpu_core[i].cpuc_pid_lock);
> >> mutex_exit(&cpu_core[i].cpuc_pid_lock);
> >> }
> >> +#else
> >> + /* XXX */
> >> + __asm __volatile("": : :"memory");
> > Indeed XXX. Semantic of acquiring/releasing a mutex, even on Solaris,
> > is much stricter then performing compiler-level memory barrier.
>
> I don't know what kind of mutexes we have in FreeBSD to mimc this behavior.
I believe that the usual sleepable mutex acquisition provides full barrier
both in Solaris and FreeBSD case. But, I also suspect that there is more
then just membar on current CPU. They use per-cpu mutexes, that is a known
technique to provide biased locking. See
http://blogs.sun.com/dave/resource/Asymmetric-Dekker-Synchronization.txt
for relatively long discussion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100824/ffa48443/attachment.pgp
More information about the svn-src-head
mailing list