Received: by 10.213.65.68 with SMTP id h4csp1096772imn; Tue, 27 Mar 2018 14:53:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5hmbeo30ZIkvSv6Vkf0b4AWPYDc95/AkFwe8/ghDoR0L/n5uLb9/wejDmvDyQJ+Tafry5 X-Received: by 2002:a17:902:8b82:: with SMTP id ay2-v6mr993743plb.12.1522187619839; Tue, 27 Mar 2018 14:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522187619; cv=none; d=google.com; s=arc-20160816; b=y13wRrKs33AUoCTgxzuoO49ZP0QqXoJKy8I9+Fx3cL5b9GbRTCGg9XxQqKP8n1+w7T lyJEwHnapMKZWJgIexM3B8CYJizw6EgQmBYXgHOTlYtJPUWl1NzySZ/jwjYLOGC0jJAk i1ERjuhrrsxjgocVsBQ4JpQ+7rlP8ZRkHwqQ9+RhCyyOcDoq0Amg+KLLx7LBSi3JNRR+ /+bVLoGeRm/8FOM7XaBPWdBvch5OtErGULbfqbpQ4DSL3NEVgHsowbcQZKfOJqq37n4I 84fN+jW7CLGsyMj9j9uCRKqYHOcqaeSOoXcPtkW4CxBE7dVo8B2fnQ7ld29HeTdkrK18 AAbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=uVsq6Qmgd31YNBIssy7CcxEj8Pg8/ZjqtILCkoqTClY=; b=UXvVA50sG0tS8Wk+CXnfBbh3KArpOuhB98HJhyUJkSIFZ4/qzJFueZGNmoN+xu4t09 XXCrimxvHnYv9bRNtV5OqD6QeuNHGk1Dt0z5AyHDmLyvHQa3FPP80hqaEOgGw0e6nfX8 pOmT1IlenwYFbTwZXgIVA+UWthRBkj76GRSJSNNHl92G79hpfCiMEGj3CsVXsWV2HapG dVbprbOB7uYPfrD5id/P8OvsnFVT4jHuAzYI5eqnItQmgm2tE236/aU0ogXp2CVXsTGv PlayOWTo5lG+A8bsGV3Nlm5eOXXScWh/mVFoq8M9X6NHB9FskpZmgaEG8dKYBIVl3yNP BIdg== ARC-Authentication-Results: i=1; mx.google.com; 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 y5si1476573pgr.152.2018.03.27.14.53.25; Tue, 27 Mar 2018 14:53:39 -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; 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 S1752069AbeC0VwZ (ORCPT + 99 others); Tue, 27 Mar 2018 17:52:25 -0400 Received: from gate.crashing.org ([63.228.1.57]:41096 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeC0VwY (ORCPT ); Tue, 27 Mar 2018 17:52:24 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w2RLpZbr023595; Tue, 27 Mar 2018 16:51:42 -0500 Message-ID: <1522187495.7364.70.camel@kernel.crashing.org> Subject: Re: [PATCH for-4.17 2/2] powerpc: Remove smp_mb() from arch_spin_is_locked() From: Benjamin Herrenschmidt To: Andrea Parri Cc: Paul Mackerras , Michael Ellerman , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Linus Torvalds Date: Wed, 28 Mar 2018 08:51:35 +1100 In-Reply-To: <20180327131339.GA4278@andrea> References: <1522060667-7034-1-git-send-email-andrea.parri@amarulasolutions.com> <1522109216.7364.30.camel@kernel.crashing.org> <20180327102521.GA7347@andrea> <1522150386.7364.53.camel@kernel.crashing.org> <20180327131339.GA4278@andrea> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-03-27 at 15:13 +0200, Andrea Parri wrote: > > > > So unless it's very performance sensitive, I'd rather have things like > > spin_is_locked be conservative by default and provide simpler ordering > > semantics. > > Well, it might not be "very performance sensitive" but allow me to say > that "40+ SYNCs in stuff like BUG_ON or such" is sadness to my eyes ;), In the fast path or the trap case ? Because the latter doesn't matter at all... > especially when considered that our "high level API" provides means to > avoid this situation (e.g., smp_mb__after_spinlock(); BTW, if you look > at architectures for which this macro is "non-trivial", you can get an > idea of the architectures which "wouldn't work"; of course, x86 is not > among these). Yes, we do appear to have different views on what is to > be considered the "simpler ordering semantics". I'm willing to change > mine _as soon as_ this gets documented: would you be willing to send a > patch (on the lines of my [1]) to describe/document such semantics? Not really :-) Just expressing an opinion. I don't fully object to your approach, just saying it's open for debate. At this point, I have too many other things to chase to follow up too much on this. Cheers, Ben.