From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751867AbdISW7k (ORCPT ); Tue, 19 Sep 2017 18:59:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34568 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751614AbdISW7i (ORCPT ); Tue, 19 Sep 2017 18:59:38 -0400 Date: Tue, 19 Sep 2017 15:59:32 -0700 From: "Paul E. McKenney" To: Scott Tsai Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] memory-barriers.txt: Fix typo in pairing example Reply-To: paulmck@linux.vnet.ibm.com References: <20170919181600.4839-1-scottt@scottt.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170919181600.4839-1-scottt@scottt.tw> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17091922-0044-0000-0000-000003926BE0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007764; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000230; SDB=6.00919474; UDB=6.00461941; IPR=6.00699700; BA=6.00005598; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017215; XFM=3.00000015; UTC=2017-09-19 22:59:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091922-0045-0000-0000-000007C16E67 Message-Id: <20170919225932.GN3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-19_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709190315 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 20, 2017 at 02:16:00AM +0800, Scott Tsai wrote: > In the "general barrier pairing with implicit control depdendency" > example, the last write by CPU 1 was meant to change variable x and not > y. The example would be pretty uninteresting if no CPU ever changes x > and the variable was initialized to zero. > > Signed-off-by: Scott Tsai Queued for review, thank you!!! Thanx, Paul > --- > Documentation/memory-barriers.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt > index b759a60624fd..468894a705a9 100644 > --- a/Documentation/memory-barriers.txt > +++ b/Documentation/memory-barriers.txt > @@ -968,7 +968,7 @@ Or even: > =============== =============================== > r1 = READ_ONCE(y); > > - WRITE_ONCE(y, 1); if (r2 = READ_ONCE(x)) { > + WRITE_ONCE(x, 1); if (r2 = READ_ONCE(x)) { > > WRITE_ONCE(y, 1); > } > -- > 2.13.5 >