Messages in this thread | | | Date | Wed, 4 Oct 2017 15:08:49 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 3/3] early_printk: Add simple serialization to early_vprintk() |
| |
On Wed, Oct 04, 2017 at 09:04:01AM -0400, Steven Rostedt wrote:
> > > If old != -1 and old != cpu, is it possible that the CPU could have > > > fetched an old value, and never try to fetch it again? > > > > What? If old != -1 and old != cpu, we'll hit the cpu_relax() and do the > > READ_ONCE() again. The READ_ONCE() guarantees we'll do the load again, > > as does the barrier() implied by cpu_relax(). > > I'm more worried about other architectures that don't have as strong of > a cache coherency.
Linux mandates cache-coherency, there's no weak or strong there. Memory ordering can be weak or strong, but coherency not.
If this patch is broken, lots of code would be broken.
| |