From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbbB1Vpn (ORCPT ); Sat, 28 Feb 2015 16:45:43 -0500 Received: from casper.infradead.org ([85.118.1.10]:41636 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050AbbB1Vpk (ORCPT ); Sat, 28 Feb 2015 16:45:40 -0500 Date: Sat, 28 Feb 2015 22:45:33 +0100 From: Peter Zijlstra To: Manfred Spraul Cc: Oleg Nesterov , "Paul E. McKenney" , LKML , 1vier1@web.de, Kirill Tkhai , Ingo Molnar , Josh Poimboeuf , stable@vger.kernel.org Subject: Re: [PATCH] ipc/sem.c: Update/correct memory barriers. Message-ID: <20150228214533.GY5029@twins.programming.kicks-ass.net> References: <1425155775-23909-1-git-send-email-manfred@colorfullife.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425155775-23909-1-git-send-email-manfred@colorfullife.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 28, 2015 at 09:36:15PM +0100, Manfred Spraul wrote: > +/* > + * Place this after a control barrier (such as e.g. a spin_unlock_wait()) > + * to ensure that reads cannot be moved ahead of the control_barrier. > + * Writes do not need a barrier, they are not speculated and thus cannot > + * pass the control barrier. > + */ > +#ifndef smp_mb__after_control_barrier > +#define smp_mb__after_control_barrier() smp_rmb() > +#endif Sorry to go bike shedding again; but should we call this: smp_acquire__after_control_barrier() ? The thing is; its not a full MB because: - stores might actually creep into it; while the control dependency guarantees stores will not creep out, nothing is stopping them from getting in; - its not transitive, and our MB is defined to be so. Oleg, Paul?