Received: by 10.213.65.68 with SMTP id h4csp3694928imn; Tue, 3 Apr 2018 09:12:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx48u0tY/35SJ1eK6DBq5QZ4REKZV3yDjjD3MQ8e6fKOWuDyPNXuAjHLjICrwABWQw065b1Ce X-Received: by 10.99.115.4 with SMTP id o4mr9469900pgc.404.1522771961592; Tue, 03 Apr 2018 09:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522771961; cv=none; d=google.com; s=arc-20160816; b=U3RQz4G4M6+SEAzABh4LfT0FULmG+ETvIcWsiptvmrcSLfTZ8Wwf0eWTfronD68jGq GFXKJzUV6OX7wvW6GXho5/OKcN8TfYFk7I752zGQa6cBaQPmeob778nYwfnfZXth6jMD 5nVS3joCtkgOKn+7TKbl11V3/Fa2VSuM2qvAGdZxvBZns/KQguXN2vyF902FUn0GLwGd Sg5N8k+Y6m9Kzj1YaIVhxnT66Xvw5HJiBlljAljEruNXfm4atlxTT6V9dBG7a5Ulf1hj N3xjLDkHFPxKePFnR+H/1zQE3pwcXbsrYhv8UIQdrSHUtiQqEZXwQAVEXAo63nyPxoxA 1Yvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=J9V6GY37zOJZcPNVenQFCldWi4y3hQANksCVJNcWIWI=; b=luz69E8tGbA4FSiapXXoRa1/QvkYndWZNu6cZGmIPAbIWqbCrYsgl/CEMoyAjluSI1 cXBGLJr9+lFwZG3QQoIW/nkYDGWCrF5ZfgOo5MBCugeNkx/z9VY2kKbQkz8pON5JMEo0 byEb7f/84av27HnNLJFhPbcwlEtjfpAtwfWnM5L1aGIa+URmTguuW9ZUABXrb10L/slT unMFm5bdBT3Q8AUqQ5K+0HdmCrDsI0GIHcTXZnCS1u22OYJ/uGBoa5+gLl/of6v8/Boh f/Xuy5LepRFG8C8IqxElPo0FRi6A/Y2WXXWx6Sd92VVTgdu9zq+Az9aIB/lH6tamiaZ9 22TA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t187si2382378pfb.2.2018.04.03.09.12.27; Tue, 03 Apr 2018 09:12:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbeDCQLG (ORCPT + 99 others); Tue, 3 Apr 2018 12:11:06 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54256 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbeDCQLF (ORCPT ); Tue, 3 Apr 2018 12:11:05 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w33G7euX136001 for ; Tue, 3 Apr 2018 12:11:05 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h4a9at259-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 03 Apr 2018 12:11:04 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Apr 2018 12:11:03 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 3 Apr 2018 12:10:38 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w33GAbtI49217548; Tue, 3 Apr 2018 16:10:37 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A575B2046; Tue, 3 Apr 2018 13:12:45 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 526DDB2050; Tue, 3 Apr 2018 13:12:45 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id C74E916C6389; Tue, 3 Apr 2018 09:11:34 -0700 (PDT) Date: Tue, 3 Apr 2018 09:11:34 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: David Howells , Andrea Parri , Ingo Molnar , linux-kernel@vger.kernel.org, Andrea Parri , Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , Jade Alglave , Luc Maranget , Akira Yokosawa Subject: Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked() Reply-To: paulmck@linux.vnet.ibm.com References: <20180403133543.GA26653@andrea> <1522600912-6208-2-git-send-email-andrea.parri@amarulasolutions.com> <1522600912-6208-1-git-send-email-andrea.parri@amarulasolutions.com> <29562.1522759749@warthog.procyon.org.uk> <13191.1522763553@warthog.procyon.org.uk> <20180403141718.GG3948@linux.vnet.ibm.com> <20180403144300.GE4082@hirez.programming.kicks-ass.net> <20180403150356.GJ3948@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180403150356.GJ3948@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18040316-2213-0000-0000-0000028962A9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008795; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01012571; UDB=6.00516069; IPR=6.00791837; MB=3.00020394; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-03 16:11:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040316-2214-0000-0000-0000599F86D3 Message-Id: <20180403161134.GA31898@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-03_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804030166 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 03, 2018 at 08:03:56AM -0700, Paul E. McKenney wrote: > On Tue, Apr 03, 2018 at 04:43:00PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 03, 2018 at 07:17:18AM -0700, Paul E. McKenney wrote: > > > Suggestions for a fix? Clearly great care is required when using it > > > in things like WARN_ON()... > > > > Yeah, don't use it there, use lockdep_assert_held(). > > Good point, -ETOOEARLY. ;-) > > > As I stated before in this thread, ideally we'd make *_is_locked() go > > away entirely. > > After being reminded of the issues on UP systems, I now have much more > sympathy for that view... And so the main remaining use case is debug prints on !PROVE_LOCKING builds. Which need some thought about the UP case. Or am I missing something here? Thanx, Paul