From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752887AbdKTUwN (ORCPT ); Mon, 20 Nov 2017 15:52:13 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44350 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752546AbdKTUwJ (ORCPT ); Mon, 20 Nov 2017 15:52:09 -0500 Date: Mon, 20 Nov 2017 12:52:04 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Will Deacon , Sami Tolvanen , Nick Desaulniers , Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, Linux Kbuild mailing list , LKML , Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Yury Norov , Matthias Kaehlcke , Alexander Potapenko , Stephen Hines , Pirama Arumuga Nainar , Manoj Gupta Subject: Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG Reply-To: paulmck@linux.vnet.ibm.com References: <20171116173417.nqsh5dpu65uj7b5s@hirez.programming.kicks-ass.net> <20171116174830.GX3624@linux.vnet.ibm.com> <20171116183950.GA3624@linux.vnet.ibm.com> <20171116184508.GC21898@arm.com> <20171116191307.GC3624@linux.vnet.ibm.com> <20171116201701.GA143965@samitolvanen.mtv.corp.google.com> <20171120180554.GM32488@arm.com> <20171120192806.xrbewr6mcffu3i3x@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171120192806.xrbewr6mcffu3i3x@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17112020-0040-0000-0000-000003C5F89A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008100; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000240; SDB=6.00948765; UDB=6.00479103; IPR=6.00729047; BA=6.00005702; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018111; XFM=3.00000015; UTC=2017-11-20 20:52:07 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112020-0041-0000-0000-000007BB1DE2 Message-Id: <20171120205204.GY3624@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-20_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711200279 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 20, 2017 at 08:28:06PM +0100, Peter Zijlstra wrote: > On Mon, Nov 20, 2017 at 06:05:55PM +0000, Will Deacon wrote: > > This is a thorny issue, but RCU (specifically rcu_dereference but probably > > also some READ_ONCEs) relies on being able to utilise syntactic dependency > > chains to order local accesses to shared variables. > > Well, we used to have READ_ONCE() and smp_read_barrier_depends(), but > we recently munged them together, in the process getting rid of > lockless_dereference(). > > So for sure, READ_ONCE() must be able to do the address dependency > thing, otherwise tons of code comes apart. I do hope that they track the volatile accesses produced by READ_ONCE(). Otherwise, it would not be good to apply this to anything touching MMIO. Thanx, Paul