From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbeAPTEa (ORCPT + 1 other); Tue, 16 Jan 2018 14:04:30 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44024 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbeAPTE2 (ORCPT ); Tue, 16 Jan 2018 14:04:28 -0500 Date: Tue, 16 Jan 2018 20:04:18 +0100 (CET) From: Thomas Gleixner To: Mathieu Desnoyers cc: Ingo Molnar , Peter Zijlstra , linux-kernel , linux-api , Andy Lutomirski , "Paul E. McKenney" , Boqun Feng , Andrew Hunter , maged michael , Avi Kivity , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dave Watson , "H. Peter Anvin" , Andrea Parri , "Russell King, ARM Linux" , Greg Hackmann , Will Deacon , David Sehr , Linus Torvalds , x86 Subject: Re: [PATCH for 4.16 04/10] membarrier: provide SHARED_EXPEDITED command (v2) In-Reply-To: <1577189631.3966.1516129345161.JavaMail.zimbra@efficios.com> Message-ID: References: <20180115191104.12437-1-mathieu.desnoyers@efficios.com> <20180115191104.12437-5-mathieu.desnoyers@efficios.com> <1577189631.3966.1516129345161.JavaMail.zimbra@efficios.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, 16 Jan 2018, Mathieu Desnoyers wrote: > ----- On Jan 16, 2018, at 1:20 PM, Thomas Gleixner tglx@linutronix.de wrote: > > And I really have to ask whether this should be named _GLOBAL_ instead of > > _SHARED_. > > > > Hmm? > > I agree with you that this behavior fits better a "global" definition > than a "shared" one, especially given that it does not target a specific > shared memory mapping. The main issue I have is due to the pre-existing > MEMBARRIER_CMD_SHARED introduced in Linux 4.3. That one should also have > been called "MEMBARRIER_CMD_GLOBAL" based on the current line of thoughts. > > Do you envision a way to transition forward to a new "MEMBARRIER_CMD_GLOBAL" for > the currently existing MEMBARRIER_CMD_SHARED ? > > Perhaps with a duplicated enum entry ? > > enum membarrier_cmd { > MEMBARRIER_CMD_QUERY = 0, > MEMBARRIER_CMD_SHARED = (1 << 0), /* use MEMBARRIER_CMD_GLOBAL instead */ > MEMBARRIER_CMD_GLOBAL = (1 << 0), That should work. Though I doubt that you ever can get rid of CMD_SHARED, but at least the code is clearer that way. Thanks, tglx