Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751888AbdLDPjG (ORCPT ); Mon, 4 Dec 2017 10:39:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbdLDPjD (ORCPT ); Mon, 4 Dec 2017 10:39:03 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1512157876-24665-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <1512157876-24665-1-git-send-email-paulmck@linux.vnet.ibm.com> <20171201195053.GA23494@linux.vnet.ibm.com> To: "Paul E. McKenney" Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com Subject: Re: [PATCH tip/core/rcu 01/21] doc: READ_ONCE() now implies smp_barrier_depends() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15075.1512401936.1@warthog.procyon.org.uk> Date: Mon, 04 Dec 2017 15:38:56 +0000 Message-ID: <15076.1512401936@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 04 Dec 2017 15:39:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 404 Lines: 15 Paul E. McKenney wrote: > - Q = READ_ONCE(P); smp_read_barrier_depends(); D = READ_ONCE(*Q); > + Q = READ_ONCE(P); D = READ_ONCE(*Q); > > the CPU will issue the following memory operations: > > Q = LOAD P, D = LOAD *Q The CPU may now issue two barriers in addition to the loads, so should we show this? E.g.: Q = LOAD P, BARRIER, D = LOAD *Q, BARRIER David