From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbdJDNJE (ORCPT ); Wed, 4 Oct 2017 09:09:04 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47260 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbdJDNJC (ORCPT ); Wed, 4 Oct 2017 09:09:02 -0400 Date: Wed, 4 Oct 2017 15:08:49 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: pmladek@suse.com, sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, "Paul E. McKenney" Subject: Re: [PATCH 3/3] early_printk: Add simple serialization to early_vprintk() Message-ID: <20171004130849.av42ermer6ju3q5c@hirez.programming.kicks-ass.net> References: <20170928121823.430053219@infradead.org> <20170928122513.431444176@infradead.org> <20171003182422.025d0a67@gandalf.local.home> <20171004090830.p5kwzu6ex2wimh4v@hirez.programming.kicks-ass.net> <20171004090401.3a5123a6@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171004090401.3a5123a6@gandalf.local.home> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.