From owner-svn-src-head@freebsd.org Mon Oct 23 16:40:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D98CE4FAB3; Mon, 23 Oct 2017 16:40:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96FEA76A76; Mon, 23 Oct 2017 16:40:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v9NGepjV099072 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 23 Oct 2017 19:40:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v9NGepjV099072 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v9NGepWc099071; Mon, 23 Oct 2017 19:40:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 23 Oct 2017 19:40:51 +0300 From: Konstantin Belousov To: Ian Lepore Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r324926 - head/share/man/man9 Message-ID: <20171023164051.GP2473@kib.kiev.ua> References: <201710231614.v9NGEtuP036360@repo.freebsd.org> <1508776102.34364.7.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1508776102.34364.7.camel@freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 23 Oct 2017 16:40:58 -0000 On Mon, Oct 23, 2017 at 10:28:22AM -0600, Ian Lepore wrote: > On Mon, 2017-10-23 at 16:14 +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Mon Oct 23 16:14:55 2017 > > New Revision: 324926 > > URL: https://svnweb.freebsd.org/changeset/base/324926 > > > > Log: > > š Expand explanation of atomicity. > > šš > > š Mention per-location total order, out of thin air, and torn writes > > š guarantees.ššMention C11 standard' memory model and one most important > > š FreeBSD additional requirement, that is aligned ordinary loads and > > š stores are atomic on processors. > > šš > > [...] > > > > +On all architectures supported by > > +.Fx , > > +ordinary loads and stores of naturally aligned integer types > > +are atomic, as executed by the processor. > > This is not true on arm{v6,v7}. š64-bit integer types can be atomically > loaded and stored with the appropriate functions from atomic.h, but are > not ordinarily so, regardless of alignment. šSmaller integer types do > meet this requirement. You cannot load 64bit integer on ARM at all, because there is no 64bit GPRs. The LDRD and LDM instructions just reinforce the point. Same is true for all other 32bit arches. But perhaps you are right, mentioning the 'native size' there would be useful. Note that the statement contains the appendix 'as executed by processor'. For instance, there is nothing that would prevent compiler from splitting the access, either explicitly or by executing memcpy() instead of LDR/STR. I thought that this would provide big enough hint to not talk about native integers size.