Received: by 10.192.165.148 with SMTP id m20csp4987923imm; Tue, 1 May 2018 07:18:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqLyuwwpwmMXHmo2THYVUMQOawBTZCh5bTEJMm8SzDtNB5PpYRJolkVzu2M+uXbrFSSbT+0 X-Received: by 2002:a17:902:6bca:: with SMTP id m10-v6mr16411858plt.6.1525184325041; Tue, 01 May 2018 07:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525184325; cv=none; d=google.com; s=arc-20160816; b=fh4lRxkr/LOC4Z7eSgW5D82vQtoLepZ2U4Cl5LYaOTWkPcP1dxqsYMJuwUbvw24oQc FrcOC2c4fdjslOK502HcE7/NnjTVUQ3dZxfel4Rcb0d12M6jUWj0Ua5BlKq+w3DynWff +tWKOytzcvpeziB5Ks7ypTLz1qkQiEamJiP5Oa0W8v+F3zeEpJvcM+saJiqO3KeOr9vD LhMPSdf3G9GQqWXakJkthkPT7FUUAyqQAQ16n/IFVy/i3Eg4NubbP0RJJr0nt9CYUQkg r4RaFimQDIQ1cUWaH4Z5QQ4c/rTdSGm/p0cebP+rgcE+ns8YDUz3rHFqKZTsvyAJ9muz CFSA== 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=kAAATI/9CKeMOxEsLJHSZRhoaSWXB7yAdpBaiN+viMA=; b=YcWBhOwGaW3z4e8vxXoRZHL01He1nY1UiYnT1vYBusazrE9BAuEgHzzpKnNlXHMUIs pbvOIj/J2CLQmrUs/mE6yYAJScTPVKnLdXxXc0yu0b5rnm1aBGkBlyTXz6agKaGUugEt ZhV+dk4uVVULF2kvH+n9/StJooxOqATJusnIpZITLMm6nz2R/X9zKzC0Hcp1Tqj0+aQL OhA/jXVeVMi6NUr5nNEcVuMwHD9pQOGj37EskWfcym7zR5XxNYUsJg+Ar40L4WLIrY29 QnpViETV88j/WlGqBiR440jhT+7q73r8UkDKwvSFlZIZms75qZeg6fyblexfOhMEfrSd YCuw== 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 t5-v6si7976516plo.113.2018.05.01.07.18.30; Tue, 01 May 2018 07:18:45 -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 S1755544AbeEAORF (ORCPT + 99 others); Tue, 1 May 2018 10:17:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41100 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753072AbeEAORE (ORCPT ); Tue, 1 May 2018 10:17:04 -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 w41EEvkD042368 for ; Tue, 1 May 2018 10:17:03 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hprf53k86-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 01 May 2018 10:17:03 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 May 2018 10:17:01 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 May 2018 10:16:57 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w41EGu2t57016440; Tue, 1 May 2018 14:16:56 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BA62B204E; Tue, 1 May 2018 11:18:57 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 2DE47B2046; Tue, 1 May 2018 11:18:57 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 3AB5D16C0E9F; Tue, 1 May 2018 07:18:17 -0700 (PDT) Date: Tue, 1 May 2018 07:18:17 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Peter Zilstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Glexiner , Boqun Feng , Frederic Weisbecker , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , Baohong Liu , Vedang Patel , kernel-team@android.com Subject: Re: [PATCH RFC v5 3/6] srcu: Add notrace variant of srcu_dereference Reply-To: paulmck@linux.vnet.ibm.com References: <20180501014204.67548-1-joelaf@google.com> <20180501014204.67548-4-joelaf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180501014204.67548-4-joelaf@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18050114-0056-0000-0000-00000447E1CD X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008956; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01025961; UDB=6.00523953; IPR=6.00805192; MB=3.00020880; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-01 14:17:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050114-0057-0000-0000-0000088BE797 Message-Id: <20180501141817.GE26088@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-01_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-1805010143 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 06:42:01PM -0700, Joel Fernandes wrote: > In this series, we are making lockdep use an rcuidle tracepoint. For > this reason we need a notrace variant of srcu_dereference since > otherwise we get lockdep splats since lockdep hooks may not have run > yet. This patch adds the needed variant. > > Cc: Steven Rostedt > Cc: Peter Zilstra > Cc: Ingo Molnar > Cc: Mathieu Desnoyers > Cc: Tom Zanussi > Cc: Namhyung Kim > Cc: Thomas Glexiner > Cc: Boqun Feng > Cc: Paul McKenney > Cc: Frederic Weisbecker > Cc: Randy Dunlap > Cc: Masami Hiramatsu > Cc: Fenguang Wu > Cc: Baohong Liu > Cc: Vedang Patel > Cc: kernel-team@android.com > Signed-off-by: Joel Fernandes > --- > include/linux/srcu.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/srcu.h b/include/linux/srcu.h > index 2ec618979b20..a1c4947be877 100644 > --- a/include/linux/srcu.h > +++ b/include/linux/srcu.h > @@ -135,6 +135,11 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp) > */ > #define srcu_dereference(p, sp) srcu_dereference_check((p), (sp), 0) > > +/** > + * srcu_dereference_notrace - no tracing and no lockdep calls from here > + */ > +#define srcu_dereference_notrace(p, sp) srcu_dereference_check((p), (sp), 1) Given that this is a one-liner, why not just use srcu_dereference_check() directly, with 1 as you do above to disable lockdep? Thanx, Paul > + > /** > * srcu_read_lock - register a new reader for an SRCU-protected structure. > * @sp: srcu_struct in which to register the new reader. > -- > 2.17.0.441.gb46fe60e1d-goog >