Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3472062rdh; Thu, 28 Sep 2023 12:40:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlDozm/lj4T2UjAUQpGjnDVOYCUAL0FSZWvy2x0b7bG5G9uauQZLBqHk0EO9nXKNXe8NrG X-Received: by 2002:a17:902:ed54:b0:1c6:2d13:5b79 with SMTP id y20-20020a170902ed5400b001c62d135b79mr1974588plb.47.1695930038465; Thu, 28 Sep 2023 12:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695930038; cv=none; d=google.com; s=arc-20160816; b=M5377OwFjYzWJ4cUC2PiaNU+R6qqjCJnbJQxyRDe9GzqeYmvYvy84np86mEYs4AMXl jbnYzrGoLsdDULL4NDhS/LcDLq8v8Y7f3ieVvG1yDlb6Dzi+7jvdEodrfS8WffZSLWY5 1qD5B3e9MLlWqQPK4Jldu+5bBNP2BUcag5vR7Jb2kXASSwND0u7jW5kDVq9fh34XQgkZ x/kzEKWOjAhRR0xYi5LJH8rt54MCWhACOEfBAfjWELW3lxqG6QyFkZJKO1mFepCxA9Pm YfX75AxQGtogpswi2KJ/mIQixn8chQGmRMgtSLc7xNYUBEi145yofPxcEJ2FM/05XAsC 7eFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=WRE3ONenBcWJeFQYyX4IKWQ+NRnbxcCB20M0YVKhOZ0=; fh=hYaPxozMUMrMQc8QQ+iRkxCmeVvmpt7ZLcv+OAhLEGs=; b=mAYRc8p70giZAfzphv4nECMDzmIw/uLj0HlD53QKDsTyP6cSZF0KJ2gKygXiZdXaIY UPX2pQMS9mxX1ZIdNMS5rYQOdpMiHrMMJQaeYZjZSOLDnnZcX9m2HVIJBjyLYCf5fRzM AJYvqw8nPdfH7n/GOpzgZRcJ6k23LRpYE8RMSAuSSZsVVX1+pafv1x755fwXLU0z8GBm VLCArAK4ZTMyUq1gW89yytwQqUk8YqIaxLCW3ZRUqhon+ljDLRlUXdAdRutMnAcqyu4I XnYa2h1xmqeKC7pvk9AKyWdxmGMZScorngrpeefIs9Ya6E9nLdw+PFLQD9wyyxr84BQR ofMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DWR77XWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j4-20020a170902da8400b001c5de4a5b4esi5918717plx.597.2023.09.28.12.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 12:40:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DWR77XWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 727E5807FD6A; Thu, 28 Sep 2023 10:11:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232093AbjI1RKY (ORCPT + 99 others); Thu, 28 Sep 2023 13:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232009AbjI1RKK (ORCPT ); Thu, 28 Sep 2023 13:10:10 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51B2ECD0; Thu, 28 Sep 2023 10:10:08 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6c63117a659so372135a34.0; Thu, 28 Sep 2023 10:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695921007; x=1696525807; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=WRE3ONenBcWJeFQYyX4IKWQ+NRnbxcCB20M0YVKhOZ0=; b=DWR77XWe55ygTxuB+y2b/UBYuD9YWBTgUr6DJ08OAFA1gGn7gNWI3oDvxn2den/UiH gaR2BoSORvdWLMrYJhrMVGOk+vmJ1kk/MedpY031YnFLr0vDPZE5nD5yBae0KPupkK/2 Uj7eTlZsTVREVzhetJKqACh3RLCsngLxukTzgkJydLnl5F1AbnzGu/z2w8QJI6lH7xBH 6Zt3rGddbTr6xP3EoS00LR8I5fsMd4+baFTcBPRV4/bdQprPdV8cv+Kkg6kFl97HU5UX aQyn3f9C9794Zn5O0KxG5RJGmldTmVGyAprig9Da0KzKXyvDzZWxFHwQfuR+IyLjmmcb isaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695921007; x=1696525807; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WRE3ONenBcWJeFQYyX4IKWQ+NRnbxcCB20M0YVKhOZ0=; b=FDQL8n7gnmVKjR6SD2EF18Es81sZjp3a5zUUxIARNP3BEXE4k72mogWgFQuc4nOko5 RvxAOjyhEpmIALKgEsv7H5B/M2Zxq8zxMgKP7yQQQp9N/blopOykjhqQD/u3tSi8qrqq zlF6ATR3wx5lXArXRMNJT/fitln1FSD2SVsZwQEsyd4KbnW6Xev3QTvgoJPte1G3Sbka SVQsrNuI0pTlBwrs/0kvey48T8RNQQujFkBKpgSk92txEmxH37HGlkFZIYaQdbqUqeC3 ZubNYIOZ2r06YN7DmWU6rXYQ01Ar7wCIdi3PsgC/FFQJCnoIvbHT1t6g5a8TpGcRKtxF 1kLQ== X-Gm-Message-State: AOJu0YzDp/QuOyMWYhB3vEFd6t2wYoIcona7vzuwIMteoOwpiGwoYdmC ZFaa1LpMYA0dtt9Y3tG2JuS8XNPdgtA= X-Received: by 2002:a9d:61da:0:b0:6b9:8feb:8337 with SMTP id h26-20020a9d61da000000b006b98feb8337mr1826391otk.9.1695921007317; Thu, 28 Sep 2023 10:10:07 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id w6-20020a056830060600b006b9848f8aa7sm2848085oti.45.2023.09.28.10.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:10:06 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id CF13B27C0064; Thu, 28 Sep 2023 13:10:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 28 Sep 2023 13:10:04 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrtddtgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveeiudff iedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsg hoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieeg qddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigi hmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 Sep 2023 13:10:02 -0400 (EDT) Date: Thu, 28 Sep 2023 10:09:23 -0700 From: Boqun Feng To: Peter Zijlstra Cc: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Ingo Molnar , Joel Fernandes , John Ogness , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Thomas Gleixner , Waiman Long , Will Deacon , Zqiang Subject: Re: [RFC PATCH] srcu: Use try-lock lockdep annotation for NMI-safe access. Message-ID: References: <20230927160231.XRCDDSK4@linutronix.de> <20230928080900.GF9829@noisy.programming.kicks-ass.net> <20230928152942.GE27245@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230928152942.GE27245@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 10:11:05 -0700 (PDT) On Thu, Sep 28, 2023 at 05:29:42PM +0200, Peter Zijlstra wrote: > On Thu, Sep 28, 2023 at 07:54:10AM -0700, Boqun Feng wrote: > > On Thu, Sep 28, 2023 at 10:09:00AM +0200, Peter Zijlstra wrote: > > > On Wed, Sep 27, 2023 at 11:06:09PM -0700, Boqun Feng wrote: > > > > > > > I think this is a "side-effect" of commit f0f44752f5f6 ("rcu: Annotate > > > > SRCU's update-side lockdep dependencies"). In verify_lock_unused(), i.e. > > > > the checking for NMI lock usages, the logic is that > > > > > > I think I'm having a problem with this commit -- that is, by adding > > > lockdep you're adding tracepoint, which rely on RCU being active. > > > > > > The result is that SRCU is now no longer usable from !RCU regions. > > > > > > > Interesting > > > > > Was this considered and intended? > > > > > > > No, I don't think I have considered this before, I think I may still > > miss something here, maybe you or Paul can provide an example for such > > a case? > > The whole trace_.*_rcuidle() machinery. Which I thought I had fully > eradicated, but apparently still exists (with *one* user) :-/ > > Search for rcuidle in include/linux/tracepoint.h > > Also, git grep trace_.*_rcuidle > Thanks! But as I mentioned in the IRC, trace_.*_rcuidle() call the special APIs srcu_read_{un,}lock_notrace(), and these won't call lockdep annotation functions. And what the commit did was only changing the lockdep annotation of srcu_read_{un,}lock(), so we are still fine here? Regards, Boqun >