Re: [PATCH v4 2/5] locking/rwsem: Protect all writes to owner by WRITE_ONCE

From: Peter Zijlstra
Date: Sun May 22 2016 - 06:42:35 EST


On Sat, May 21, 2016 at 09:04:14AM -0700, Peter Hurley wrote:
> And by the way, it's not just "here" but _everywhere_.
> What about reading ->on_cpu locklessly?

In the smp_cond_acquire() rework that I have pending that one is
actually 'fixed'.

But yeah, the whole load/store tearing thing is giant pain inflicted
upon us by C language and GCC people :/

And the problem is that the 'regression' is now so old it doesn't matter
they fix it or not, we have to support compilers that think its fine to
generates tears :-(