From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760633AbcBYOIj (ORCPT ); Thu, 25 Feb 2016 09:08:39 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:50997 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760148AbcBYOIi (ORCPT ); Thu, 25 Feb 2016 09:08:38 -0500 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Thu, 25 Feb 2016 06:08:16 -0800 From: "Paul E. McKenney" To: Jianyu Zhan Cc: Mathieu Desnoyers , LKML , Ingo Molnar , Lai Jiangshan , dipankar@in.ibm.com, Andrew Morton , josh@joshtriplett.org, Thomas Gleixner , Peter Zijlstra , rostedt , David Howells , Eric Dumazet , dvhart@linux.intel.com, fweisbec@gmail.com, Oleg Nesterov , bobby prani Subject: Re: [PATCH tip/core/rcu 02/14] documentation: Fix control dependency and identical stores Message-ID: <20160225140816.GK3522@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20160224050021.GA14616@linux.vnet.ibm.com> <1456290047-16654-2-git-send-email-paulmck@linux.vnet.ibm.com> <467632883.7240.1456348324456.JavaMail.zimbra@efficios.com> <20160224214013.GF3522@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16022514-0013-0000-0000-00001D351B03 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2016 at 02:41:07PM +0800, Jianyu Zhan wrote: > On Thu, Feb 25, 2016 at 5:40 AM, Paul E. McKenney > wrote: > > So ordering between the read from "a" and the write to "b" is still > > preserved. The reason this works is that the smp_mb() does all the > > ordering, so the fact that the control dependency has been eliminated > > is irrelevant. > > > Thanks, Paul, nice clarification. > > I thinks this example qualifies as an good example to demonstrate the subtle > scope of effect of these two level barriers. > > A vivid example is always better for understanding instead of learning > "barrier() is compiler-level > barrier, and smp_*mb() is processor-level barrier" by rote , > especially for the new comers to memory-barriers.txt. ;-) Glad you like it. ;-) Thanx, Paul