Received: by 10.213.65.68 with SMTP id h4csp311476imn; Wed, 28 Mar 2018 04:11:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48gic9fWBROdkh6b/mndEtHn7RC198QCEv8yTYVLeDBLwuEsd6Tc/7j87iKatnXGrNDgF38 X-Received: by 10.99.111.139 with SMTP id k133mr2320742pgc.236.1522235470032; Wed, 28 Mar 2018 04:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522235469; cv=none; d=google.com; s=arc-20160816; b=a4dqHvkCwLEy99OzJHIncfaieZ5anxemWd6nHIYf9qLO8tys92aEig+/v/07MBJrs/ ZopyRFJ/iCDTkzIyuHXr2nSrS/i7qAbg2P686pWl6MzUig1d/hxHUX3cmdvtM9gPZIra vVJpaR7fem1BZ/b4zLopPfOPwiavtQ6dn0rp9vPyM9fkyJJQEABJXl0bVtEVs42ssmt1 784VledfhzCNnsFrYSBDJysmz3mWzBXMMt3pyiXFjoOzUhA149q6aNs2ukbTlHrIqpt2 WZYUhCYEcv2gwNpY/Oi7dnWPk4Y5qfwc703Fou+5iUtoY3eK5tLyRgxVIkfz8DcQMuxs f6GQ== 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=1uunfMrhmdMamI5YhWw74sfaapW12PidhcvTs5gp8pU=; b=cILk6SB3BHbTQjoUa5hUdNUQuBTiGlXjrBy4C6jD2D6xPKVbWtKptaO40xGq2bkbJN zhfAp0zuslu+Z4PkOTJdmbz+D1pHmzzCxuvq+kAaYA0DSxomxMXw9jU3gm6+1/4YSs8B HMcno9eLNoEe3jzuypgs4t+wrtTLIToArUIBXcUzfpyUEZMFVH6TmF1ml//WwMjFeEAJ uEsOHtZ4Wohv9lNQZV3Pgbkby2Hmem/+6Kv95g1+j5xk17v1+MR19f1KDpRiiYc0Frh6 YFJ1SbHwWe4htdndRLMQEJ/Rd7W474QhYCmlIsrD0GUcyxHtQ/c/OKq2KW2e0ha3ifg+ Nvsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=FfyYDeeN; 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 d2-v6si3256997pln.115.2018.03.28.04.10.55; Wed, 28 Mar 2018 04:11:09 -0700 (PDT) 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=FfyYDeeN; 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 S1752836AbeC1LIX (ORCPT + 99 others); Wed, 28 Mar 2018 07:08:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54374 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbeC1LIW (ORCPT ); Wed, 28 Mar 2018 07:08:22 -0400 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=1uunfMrhmdMamI5YhWw74sfaapW12PidhcvTs5gp8pU=; b=FfyYDeeNId9UcrWdeLc9gFqRa nBYSczHUMIySrvTP2Rwb1dnpWRFOKCyYjy4h0cfGup7Um8arfLyzNtlD+t9i+7e1RUEQdkT9kwfhB GtZEiDkYd85CrEefUJ9EWJbyvqy17pOAvUgSbyCnWqGHeKIfAtIdnlwaa1BUDp7aJSSI/FAhvmnqQ ofGwM69wRY+lzOm2/n4eONk9+F3k5fFBjTFnvRHN8uyZAGilduRn27lMukX95czgFkHKgAzhOLmo+ b0juOXuEfhR1i26MwLjTJbBi4C+YfbNaOhrcr7S3Bop9Fdb2k6/+9sG4YBAoKEwpezcR2v9yk2kJq ZZaRFQopg==; 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.90_1 #2 (Red Hat Linux)) id 1f18w6-0001od-Bt; Wed, 28 Mar 2018 11:08:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 37427202A4A09; Wed, 28 Mar 2018 13:08:09 +0200 (CEST) Date: Wed, 28 Mar 2018 13:08:09 +0200 From: Peter Zijlstra To: Michael Ellerman Cc: Andrea Parri , Benjamin Herrenschmidt , Paul Mackerras , Ingo Molnar , linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH for-4.17 2/2] powerpc: Remove smp_mb() from arch_spin_is_locked() Message-ID: <20180328110809.GE4129@hirez.programming.kicks-ass.net> References: <1522060667-7034-1-git-send-email-andrea.parri@amarulasolutions.com> <1522109216.7364.30.camel@kernel.crashing.org> <20180327102521.GA7347@andrea> <87a7us3h66.fsf@concordia.ellerman.id.au> <20180328110436.GR4043@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180328110436.GR4043@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 28, 2018 at 01:04:36PM +0200, Peter Zijlstra wrote: > On Wed, Mar 28, 2018 at 04:25:37PM +1100, Michael Ellerman wrote: > > Documenting it would definitely be good, but even then I'd be inclined > > to leave the barrier in our implementation. Matching the documented > > behaviour is one thing, but the actual real-world behaviour on well > > tested platforms (ie. x86) is more important. > > By that argument you should switch your spinlock implementation to RCpc > and include that SYNC in either lock or unlock already ;-) *RCsc* obviously... clearly I need to wake up moar. > Ideally we'd completely eradicate the *_is_locked() crud from the > kernel, not sure how feasable that really is, but it's a good goal. At > that point the whole issue of the barrier becomes moot of course.