Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966058AbdGUAXk (ORCPT ); Thu, 20 Jul 2017 20:23:40 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32814 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965209AbdGUAXh (ORCPT ); Thu, 20 Jul 2017 20:23:37 -0400 Date: Fri, 21 Jul 2017 08:24:40 +0800 From: Boqun Feng To: "Paul E. McKenney" Cc: Akira Yokosawa , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] documentation: Fix two-CPU control-dependency example Message-ID: <20170721002440.m6e5sdsa53lxygo4@tardis> References: <101f5108-663e-7fa4-ac2b-e790320e4e6f@gmail.com> <20170719215602.GK3730@linux.vnet.ibm.com> <20170720013112.fmrml6abdhi2nqdt@tardis> <20170720054704.GM3730@linux.vnet.ibm.com> <20170720161152.GQ3730@linux.vnet.ibm.com> <20170720214234.GY3730@linux.vnet.ibm.com> <55457ca1-a8db-213c-3b9c-ead441f97200@gmail.com> <20170720230714.GA3730@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170720230714.GA3730@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 792 Lines: 23 On Thu, Jul 20, 2017 at 04:07:14PM -0700, Paul E. McKenney wrote: [...] > > > > So if I respin the patch with the extern, would you still feel reluctant? > > Yes, because I am not seeing how this change helps. What is this telling > the reader that the original did not, and how does it help the reader > generate good concurrent code? > One thing I think we probably should do is to make READ_ONCE() semantics more clear, i.e. call it out that in our conceptual model for kernel programming we always rely on the compiler to be serious about the return value of READ_ONCE(). I didn't find the comment before READ_ONCE() or memory-barriers.txt talking about something similar. Or am I the only one having this kinda semantics guarantee in mind? Regards, Boqun > Thanx, Paul >