[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171004130849.av42ermer6ju3q5c@hirez.programming.kicks-ass.net>
Date: Wed, 4 Oct 2017 15:08:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: pmladek@...e.com, sergey.senozhatsky@...il.com,
linux-kernel@...r.kernel.org, mingo@...nel.org, tglx@...utronix.de,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
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.
Powered by blists - more mailing lists