Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbdLDVzD (ORCPT ); Mon, 4 Dec 2017 16:55:03 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:43175 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752819AbdLDVzC (ORCPT ); Mon, 4 Dec 2017 16:55:02 -0500 Date: Mon, 4 Dec 2017 22:54:48 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: David Howells , 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, 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() Message-ID: <20171204215448.GY3326@worktop> References: <1512157876-24665-1-git-send-email-paulmck@linux.vnet.ibm.com> <20171201195053.GA23494@linux.vnet.ibm.com> <15076.1512401936@warthog.procyon.org.uk> <20171204185215.GB7829@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171204185215.GB7829@linux.vnet.ibm.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 798 Lines: 21 On Mon, Dec 04, 2017 at 10:52:15AM -0800, Paul E. McKenney wrote: > On Mon, Dec 04, 2017 at 03:38:56PM +0000, David Howells wrote: > > 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 > > Good point! How about as shown in the updated patch below? Humm, I thought the idea was to completely remove read_barrier_depends from the lkmm and memory-barriers.txt, making it an Alpha implementation detail.