From owner-svn-src-head@FreeBSD.ORG Tue Aug 24 12:05:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3753F10656BC; Tue, 24 Aug 2010 12:05:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A099E8FC1A; Tue, 24 Aug 2010 12:05:39 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o7OC5c76071237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Aug 2010 15:05:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o7OC5cB2026906; Tue, 24 Aug 2010 15:05:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o7OC5c76026905; Tue, 24 Aug 2010 15:05:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 24 Aug 2010 15:05:38 +0300 From: Kostik Belousov To: Rui Paulo Message-ID: <20100824120538.GL2396@deviant.kiev.zoral.com.ua> References: <201008241111.o7OBBwvn074031@svn.freebsd.org> <20100824114818.GJ2396@deviant.kiev.zoral.com.ua> <0329C085-13EF-47F1-B8BB-DB7679444FAE@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eUhXrt0ludXSDj9h" Content-Disposition: inline In-Reply-To: <0329C085-13EF-47F1-B8BB-DB7679444FAE@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211738 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 12:05:40 -0000 --eUhXrt0ludXSDj9h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 24, 2010 at 12:59:30PM +0100, Rui Paulo wrote: >=20 > On 24 Aug 2010, at 12:48, Kostik Belousov wrote: > >> +#if defined(sun) > >> for (i =3D 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. >=20 > I don't know what kind of mutexes we have in FreeBSD to mimc this behavio= r. 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. --eUhXrt0ludXSDj9h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxztZEACgkQC3+MBN1Mb4jahQCgvb3gyQEUP0mz9mnXz62u2cre ayIAoKv97KKKxnHeHsbWfN0o6udYgvbZ =j+cU -----END PGP SIGNATURE----- --eUhXrt0ludXSDj9h--