Received: by 10.223.176.5 with SMTP id f5csp2909232wra; Thu, 1 Feb 2018 07:53:55 -0800 (PST) X-Google-Smtp-Source: AH8x225xzSZi9H55RX1kJxXYERs+j8+BWsyNym+AUyppBzhKhVZkN3DoQWy5reYhWKGwvGlO5D9Y X-Received: by 10.99.55.66 with SMTP id g2mr29856972pgn.61.1517500435748; Thu, 01 Feb 2018 07:53:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517500435; cv=none; d=google.com; s=arc-20160816; b=yNsmUVYw5dlmCVnktkcA71JInVvPs115Ygct8xl1zeRbqYGijgRLSPiIAbX6kxwQ33 Itnyth2qj/Gntr0WyoocgGLSZMefGzAwTcaknE0OPR3Zqv7WrvXU9VAVVSibkuPcuLQn f7d1oGZ1vkjgRRX2cCnfbdTdjx8+r6DiFp63HSUq7gTpKLclhpVOaHqiSUj1YllAy9Ml c0QKoaGzc1jFye6ZQf9Zc3ABJe8O+6jlhSTOWQGMJ9xXXKEWOhHwD7LOtHYyOxqfNUA9 W6Ad79XudVPwcuWEZoKnMHQ2OO9JUb/+UFm1Jj5knSrNWFhy31gnulwhXGtGT9ewae9/ msHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=4qR6bMOtDOg9gq/YIO66ywcNMDY8NN5pKYYfRaA99ms=; b=GIjc+s27D6AvOJS4bqR0NsQrbM7sUIW2DNvsppVo0GVWp2jwZAGJvqW/H2wS68gZqS BislhmRzc/8XzkjcRxLlfTRTQ7IqMEi1FD4hbdRsGto2IXlyvi9fR+RnL2JgH2GAQ3IJ SP2Q6VzkeSVlKKb5oy8neRh9kLaWAJXCavLLWq6IbTCtTOl/tS2mwzFWu11j7KIM2zVB R7bgXcLJDCsDhY1unNOGDO5VZK/IAhWbJzGTr8kJvM0BGDmGKXfAstyCzxiiTWkxs/9Y LCft3S4DwxRAUd9BNxNx7Y2XIwt8rnSL9Dra1ZARgVT83sI/c0Zcpm0vbmuOd/yNTHPT rDxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ccIkzmll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si2011344plb.108.2018.02.01.07.53.41; Thu, 01 Feb 2018 07:53:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ccIkzmll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbeBAPxF (ORCPT + 99 others); Thu, 1 Feb 2018 10:53:05 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55616 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752538AbeBAPw6 (ORCPT ); Thu, 1 Feb 2018 10:52:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4qR6bMOtDOg9gq/YIO66ywcNMDY8NN5pKYYfRaA99ms=; b=ccIkzmllm7+yNh93V6j0iw1em aXirCO263tKn6CfDXIboIozgUnN2AJBvJB7CdcBPGO1P/tqLnsK4eI7skUF7srxs2SdGL+xZzQeIF axeVLROOpsDkLbjIOzTBFS8mwTAPadTdlAqrzMlrZCfIqcdD5kSo4sJ3grJD/FMO3x4psGvfN0qC3 ohlo+rU7dNppbXwQU12ijskop9RvB9cQiOtrdcUz7EWzD4dMWUQYp2Lv1Bb0P0xOkhY41dlaglodu ua6zdyjnlSHck7xHZmEVF8BkhIKFuak6Ckqu6k0fA8kONTkqNAyteA5Vp2sz8aFND5gO7sDHGZVmE DwmQltkTA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ehHAK-0007Bu-V8; Thu, 01 Feb 2018 15:52:45 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CDFA12029F9F9; Thu, 1 Feb 2018 16:52:42 +0100 (CET) Date: Thu, 1 Feb 2018 16:52:42 +0100 From: Peter Zijlstra To: Will Deacon Cc: Stafford Horne , Paul McKenney , Jonas Bonn , Stefan Kristiansson , David Howells , Arnd Bergmann , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: asm-generic: Disallow no-op mb() for SMP systems Message-ID: <20180201155242.GL2295@hirez.programming.kicks-ass.net> References: <20180131130034.GR2269@hirez.programming.kicks-ass.net> <20180131131737.GA5097@arm.com> <20180131132610.GT2269@hirez.programming.kicks-ass.net> <20180201122750.GE30895@lianli.shorne-pla.net> <20180201132909.GW2249@hirez.programming.kicks-ass.net> <20180201133229.GB9182@arm.com> <20180201135329.GB2269@hirez.programming.kicks-ass.net> <20180201153951.GG9182@arm.com> <20180201155007.GB2249@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180201155007.GB2249@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 04:50:07PM +0100, Peter Zijlstra wrote: > On Thu, Feb 01, 2018 at 03:39:51PM +0000, Will Deacon wrote: > > > I could've gotten my brain in a twist or course, which isn't _that_ > > > unusual. I never seem to be able to quite remember the holes you have > > > with ll/sc on arm64 :-) > > > > Is smp_mb__before_atomic supposed to provide ordering guarantees if it's > > used before a failed cmpxchg? If so, I think it's needed here because the > > l.swa might not even execute. Or did I just invent another problem? > > I think it should do so indeed (and afaik all our current archs are good > that way). See commit: 34d54f3d6917 ("locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures")