Re: [RFC][PATCH 3/5] arch:s/smp_mb__(before|after)_(atomic|clear)_(dec,inc,bit)/smp_mb__\1/g

From: Will Deacon
Date: Fri Feb 07 2014 - 04:53:21 EST


On Thu, Feb 06, 2014 at 07:12:04PM +0000, Paul E. McKenney wrote:
> On Thu, Feb 06, 2014 at 02:48:28PM +0100, Peter Zijlstra wrote:
> > Because atomic ops are implemented the same across an architecture,
> > the current incomplete set of extra barriers:
> >
> > smp_mb__before_atomic_inc()
> > smp_mb__after_atomic_inc()
> > smp_mb__before_atomic_dec()
> > smp_mb__after_atomic_dec()
> > smp_mb__before_clear_bit()
> > smp_mb__after_clear_bit()
> >
> > is both incomplete and superfluous.
> >
> > It is incomplete because there are far more atomic operations that do
> > not return values -- such as atomic_add(), set_bit() etc. And it is
> > superfluous because they're all the same anyway.
> >
> > Simplify things by reducing the triplicate set into a single set of
> > barriers that is valid for all void atomic ops:
> >
> > smp_mb__before_atomic()
> > smp_mb__after_atomic()
> >
> > Signed-off-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> I very much like the API shrinkage. The RCU changes are good, and
> I believe that the rest is OK too, though my eyes were going a bit
> buggy towards the end...
>
> Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

... and the arm[64] parts look fine to me.

Acked-by: Will Deacon <will.deacon@xxxxxxx>

Usual comment about upcoming conflicts :)

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/