[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230120212037.GW2948950@paulmck-ThinkPad-P17-Gen-1>
Date:   Fri, 20 Jan 2023 13:20:37 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Andrea Parri <parri.andrea@...il.com>,
        Jonas Oberhauser <jonas.oberhauser@...wei.com>,
        Peter Zijlstra <peterz@...radead.org>, will <will@...nel.org>,
        "boqun.feng" <boqun.feng@...il.com>, npiggin <npiggin@...il.com>,
        dhowells <dhowells@...hat.com>,
        "j.alglave" <j.alglave@....ac.uk>,
        "luc.maranget" <luc.maranget@...ia.fr>, akiyks <akiyks@...il.com>,
        dlustig <dlustig@...dia.com>, joel <joel@...lfernandes.org>,
        urezki <urezki@...il.com>,
        quic_neeraju <quic_neeraju@...cinc.com>,
        frederic <frederic@...nel.org>,
        Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus
 test)
On Fri, Jan 20, 2023 at 03:36:24PM -0500, Alan Stern wrote:
> On Fri, Jan 20, 2023 at 11:20:32AM -0800, Paul E. McKenney wrote:
> > On Fri, Jan 20, 2023 at 01:37:51PM -0500, Alan Stern wrote:
> > > srcu_read_unlock() does not need a full smp_mb().
> > 
> > That is quite possible, and that is what we are looking into.  And testing
> > thus far agrees with you.  But the grace-period ordering constraints
> > are quite severe, so this requires careful checking and severe testing.
> 
> If you're interested, I can provide a simple argument to show that the 
> Fundamental Law of RCU would continue to hold with only a release fence.  
> There is an added requirement: merely that synchronize_srcu() must have 
> an smp_mb() somewhere after its final read of the unlock counters -- 
> which your version of the algorithm already has.
Please!
For your amusement, here is a very informal argument that this is
the case:
https://docs.google.com/document/d/1xvwQzavmH474MBPAIBqVyvCrCcS5j2BpqhErPhRj7Is/edit?usp=sharing
See the "Read-Side Optimizations" section at the end.
							Thanx, Paul
Powered by blists - more mailing lists
 
