Re: Memory-ordering recipes
From: Peter Zijlstra
Date: Thu Sep 21 2017 - 08:45:43 EST
On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote:
> So what litmus tests are needed? Here is my initial set:
> 1. Release-acquire chains, AKA ISA2, Z6.2, LB, and 3.LB
> Lots of variety here, can in some cases substitute:
> a. READ_ONCE() for smp_load_acquire()
> b. WRITE_ONCE() for smp_store_release()
> c. Dependencies for both smp_load_acquire() and
> d. smp_wmb() for smp_store_release() in first thread
> of ISA2 and Z6.2.
> e. smp_rmb() for smp_load_acquire() in last thread of ISA2.
> 2. MP (see test6.pdf for nickname translation)
> a. smp_store_release() / smp_load_acquire()
> b. rcu_assign_pointer() / rcu_dereference()
> c. smp_wmb() / smp_rmb()
> d. Replacing either of the above with smp_mb()
> 3. SB
> a. smp_mb(), as in lockless wait-wakeup coordination.
> And as in sys_membarrier()-scheduler coordination,
> for that matter.
So I have no idea what you're proposing here. The above is just a bunch
of words without meaning :-(