From owner-svn-src-user@FreeBSD.ORG Fri Dec 28 23:00:25 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B832DB0D; Fri, 28 Dec 2012 23:00:25 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 67D3B8FC08; Fri, 28 Dec 2012 23:00:21 +0000 (UTC) Received: from scorpio.default ([2.26.217.54]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id qBSN0JOB085168 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 28 Dec 2012 23:00:20 GMT (envelope-from theraven@FreeBSD.org) Subject: Re: svn commit: r244793 - in user/attilio/membarclean/dev: drm drm2 netmap virtio Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/signed; boundary="Apple-Mail=_09793C2B-42F2-4C6C-A75A-780C585F41A6"; protocol="application/pgp-signature"; micalg=pgp-sha1 From: David Chisnall In-Reply-To: Date: Fri, 28 Dec 2012 23:00:12 +0000 Message-Id: <62083874-BB5F-484C-809E-89BF404469CE@FreeBSD.org> References: <201212282218.qBSMIfX2015054@svn.freebsd.org> To: Bryan Venteicher X-Mailer: Apple Mail (2.1278) Cc: Attilio Rao , src-committers@FreeBSD.org, svn-src-user@FreeBSD.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 23:00:25 -0000 --Apple-Mail=_09793C2B-42F2-4C6C-A75A-780C585F41A6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 28 Dec 2012, at 22:43, Bryan Venteicher wrote: > VirtIO uses 16-bit fields which makes it hard to adapt to MI > atomic(9).=20 At some point, we should start deprecating atomic(9) and moving to the = C11 standard versions of the same functions. These are implemented in = recent clang and gcc as builtins, which provides the compiler much = better optimisation opportunities, because it can reorder instructions = that do not touch memory around them and can reorder any loads and = stores that would not violate the happens-before relationships = established by the barrier semantics (the inline asm is always a full = barrier, from the perspective of the compiler, though not from the = perspective of the CPU, meaning that we penalise in-order = architectures). =20 It can also ensure that sufficient padding exists. For example, an = _Atomic(short) on ARM should have 2 bytes of padding so that it can be = used in an ll / sc pair. The standard explicitly does not permit = arbitrary casts between pointers to T and _Atomic(T) for this reason. = Finally, the _Atomic qualifier can statically check that atomic and = non-atomic operations are not mixed on the same type, avoiding races. David= --Apple-Mail=_09793C2B-42F2-4C6C-A75A-780C585F41A6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) iQIcBAEBAgAGBQJQ3iR9AAoJEKx65DEEsqIdq2YQAMBuTPDzqFGIPWZjcPGZni2u IDk4apTcXmBphTffsHyIuTozubnJPWHTYLGzlLb9IwzRitrtWfKE17bBYECKxOry Ls+7fCg2PYa6Klhdq+mWppRlK2SXJsEJZPNHYRY/vUmr6IyqVk0vHIQPzoq8wegk yPY89DxC8TtEnUP5hpMqdKwe65/HKM3oG4jxrg/V2ZavCQrLQ6BEi7QM6Cslr47/ ZVujLiNlP7U1sSchk7QjNDlEJxERI+GRGmMr9EZKZmeOBi2EUoIxdDUqnyz87GXR /VqTjO1Z/UnwsRtfdam/WXbPfezNFO+b9A3ZQVwaZg12JNZArVAt70C0oJ3b7cjy vgCalvVhvXel7nt0oFZEqzNH37Ret4MeFO1As7mCu0T/itz98evH5yNL0m6algDa UWB1+Kv3PgFze9GnHs/EkLh/ISgkUS6Y7gTks8HgOMyfYhWndQaEYtUQ0+qTsA4b S3nqL0PFSOU/oR4Rptp7VfU00NMo+pYOp3QO3ZfWbxRPS43sSyHvomtm01S2APVs OPSA0OekB/9c5n4Ed0LD67WJrjrnIZMMZyRQI5VUjgrO6ZGbY4gYme7l6YAuQzSk +Wh5tewhveyi7Y7/qI7h+egHExhDByAJgvIC1VBoM+CbubIflZn7hKKza3qvSs/g RTSbAQD9uhlb83WnmgcH =UAqA -----END PGP SIGNATURE----- --Apple-Mail=_09793C2B-42F2-4C6C-A75A-780C585F41A6--