From owner-svn-src-head@FreeBSD.ORG Mon Jun 4 10:50:29 2012 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 8EEA31065674; Mon, 4 Jun 2012 10:50:29 +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 58EA78FC0C; Mon, 4 Jun 2012 10:50:29 +0000 (UTC) Received: from [192.168.0.2] (cpc11-cwma8-2-0-cust430.7-3.cable.virginmedia.com [82.11.219.175]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q54Ao7F2037168 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 4 Jun 2012 10:50:22 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <4FCC873B.90104@freebsd.org> Date: Mon, 4 Jun 2012 11:44:31 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201206021810.q52IAGZA004238@svn.freebsd.org> <4FCC873B.90104@freebsd.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov Subject: Re: svn commit: r236456 - in head/sys: amd64/include i386/include 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: Mon, 04 Jun 2012 10:50:29 -0000 On 4 Jun 2012, at 11:00, Tijl Coosemans wrote: > On 02-06-2012 20:10, Konstantin Belousov wrote: >> Author: kib >> Date: Sat Jun 2 18:10:16 2012 >> New Revision: 236456 >> URL: http://svn.freebsd.org/changeset/base/236456 >>=20 >> Log: >> Use plain store for atomic_store_rel on x86, instead of implicitly >> locked xchg instruction. IA32 memory model guarantees that store = has >> release semantic, since stores cannot pass loads or stores. >=20 > They can pass non-temporal stores can't they? Now that we have support for C11 atomics via stdatomic.h (in current and = stable), it would be nice to compare their performance with the assembly = versions. There is the potential for greater optimisation, because the = compiler treats any asm block as a full barrier, so only the CPU, not = the compiler, can reorder loads and stores across it. With the C11 = stuff, on a new compiler (clang or gcc 4.7), the compiler can perform = any reordering of loads and stores that does not violate the semantics = specified by the atomic operation. David=