Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables
From: Will Deacon
Date: Thu Oct 05 2017 - 12:31:56 EST
On Tue, Oct 03, 2017 at 12:11:10PM -0700, Paul E. McKenney wrote:
> On Fri, Sep 29, 2017 at 05:33:49PM +0100, Will Deacon wrote:
> > On Fri, Sep 29, 2017 at 09:29:39AM -0700, Paul E. McKenney wrote:
> > > On Fri, Sep 29, 2017 at 10:08:43AM +0100, Will Deacon wrote:
> > > > Ok, but where does that leave us wrt my initial proposal of moving
> > > > smp_read_barrier_depends() into READ_ONCE and getting rid of
> > > > lockless_dereference?
> > > >
> > > > Michael (or anybody else running mainline on SMP Alpha) -- would you be
> > > > able to give the diff below a spin and see whether there's a measurable
> > > > performance impact?
> > >
> > > This will be a sensitive test. The smp_read_barrier_depends() can be
> > > removed from lockless_dereference(). Without this removal Alpha will
> > > get two memory barriers from rcu_dereference() and friends.
> > Oh yes, good point. I was trying to keep the diff simple, but you're
> > right that this is packing too many barriers. Fixed diff below.
> Not seeing any objections thus far. If there are none by (say) the
> end of this week, I would be happy to queue a patch for the 4.16
> merge window. That should give ample opportunity for further review
> and testing.
Ok, full patch below.