Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbdI1QHw (ORCPT ); Thu, 28 Sep 2017 12:07:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34142 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751548AbdI1QHu (ORCPT ); Thu, 28 Sep 2017 12:07:50 -0400 Date: Thu, 28 Sep 2017 09:07:43 -0700 From: "Paul E. McKenney" To: Will Deacon Cc: Peter Zijlstra , kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, ynorov@caviumnetworks.com, rruigrok@codeaurora.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org, catalin.marinas@arm.com, rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org Subject: Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables Reply-To: paulmck@linux.vnet.ibm.com References: <1506527369-19535-1-git-send-email-will.deacon@arm.com> <1506527369-19535-2-git-send-email-will.deacon@arm.com> <20170928083801.m6rb4frbbgzgam2o@hirez.programming.kicks-ass.net> <20170928084535.GA19060@arm.com> <20170928154354.GK3521@linux.vnet.ibm.com> <20170928154954.GA9892@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928154954.GA9892@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17092816-2213-0000-0000-00000222D992 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007805; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000232; SDB=6.00923649; UDB=6.00464361; IPR=6.00703787; BA=6.00005613; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017305; XFM=3.00000015; UTC=2017-09-28 16:07:48 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092816-2214-0000-0000-000057B10C6B Message-Id: <20170928160743.GN3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-28_05:,, 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-1709280238 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2071 Lines: 40 On Thu, Sep 28, 2017 at 04:49:54PM +0100, Will Deacon wrote: > On Thu, Sep 28, 2017 at 08:43:54AM -0700, Paul E. McKenney wrote: > > On Thu, Sep 28, 2017 at 09:45:35AM +0100, Will Deacon wrote: > > > On Thu, Sep 28, 2017 at 10:38:01AM +0200, Peter Zijlstra wrote: > > > > On Wed, Sep 27, 2017 at 04:49:28PM +0100, Will Deacon wrote: > > > > > In many cases, page tables can be accessed concurrently by either another > > > > > CPU (due to things like fast gup) or by the hardware page table walker > > > > > itself, which may set access/dirty bits. In such cases, it is important > > > > > to use READ_ONCE/WRITE_ONCE when accessing page table entries so that > > > > > entries cannot be torn, merged or subject to apparent loss of coherence. > > > > > > > > In fact, we should use lockless_dereference() for many of them. Yes > > > > Alpha is the only one that cares about the difference between that and > > > > READ_ONCE() and they do have the extra barrier, but if we're going to do > > > > this, we might as well do it 'right' :-) > > > > > > I know this sounds daft, but I think one of the big reasons why > > > lockless_dereference() doesn't get an awful lot of use is because it's > > > such a mouthful! Why don't we just move the smp_read_barrier_depends() > > > into READ_ONCE? Would anybody actually care about the potential impact on > > > Alpha (which, frankly, is treading on thin ice given the low adoption of > > > lockless_dereference())? > > > > This is my cue to ask my usual question... ;-) > > > > Are people still running mainline kernels on Alpha? (Added Alpha folks.) > > > > As always, if anyone is, we must continue to support Alpha, but sounds > > like time to check again. > > I'll be honest and say that I haven't updated mine for a while, but I do > have a soft spot for those machines :( Let's see what the Alpha folks say. I myself have had a close relationship with Alpha for almost 20 years, but I suspect that in my case it is more a hard spot on my head rather than a soft spot in my heart. ;-) Thanx, Paul