Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3289539rwb; Tue, 8 Nov 2022 02:52:13 -0800 (PST) X-Google-Smtp-Source: AMsMyM4vTTVwf4X/oiUuqHF8e/msZoGhQzqieJUHDtY1h0yogywqDPYI9kRPIQ2Z8B8vLVbkUMTo X-Received: by 2002:a17:907:a07a:b0:7ad:88f8:7ed9 with SMTP id ia26-20020a170907a07a00b007ad88f87ed9mr50696525ejc.579.1667904733006; Tue, 08 Nov 2022 02:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667904732; cv=none; d=google.com; s=arc-20160816; b=umXbobNImkl/iKdhagUTblDHwJlHgMx3vVKoePxK+Dxeb1WeAU8CHF9P4yFYtCQK42 kYCfD4CbzY16WDczV1O9sKqQTUm13Gv9RaQ+4bJ0SOu1A3nvFqfTTNJMTmO3MmMqv7Zu I3+lRWMArFM+QKaM6VBDDKOe7GZR7f6yEGM/YJ1f/8ZpcoN99OnhTvUYvqStEezsYyVB QgRC6P36vtCUp+5nbY/lMgL0pWDl0L5xNiU0SVagM+bJ6gWFnE2ESRh+UVXiTgdth5ms +9g1Ug+ygIfj1aVRUqBzlHfTDtFJXsM88tNGtLKs5za2q2oDgyCsK0nqsbuFwnPs+OHW 5EIg== 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:dkim-signature; bh=42Wym6hzhZrHL5OTzyhJU3dom4Zp+KxcEH8YfQkDIFA=; b=TQkTHmdaHA5kY9h78znNoI3IP+C2/xXpceGH8tIgGwijOs371qzc0PHX1ZWkWk0cxK G4BaJCXBoDr3x4wNLDRPnObkwW/aAC8NqlLfbz+I4aSqdZXGHVXmUcqVee8Ia8/Z/OAm 5k/ZRCG5qQ30EOui9yfcU5atASkhQZrl3Nl08Jh5AFsrNBdR3r6HqcRY0j31FNfuitHP bcJGn6AGVvv4DfS1KXLWTmgANYJLI9/W0kTatUVEwCZANYkh5BRsjV6fIwTJBEmCgaie 1C+085ZWjU1r0AxBp1eDoYMPG85GpPKD9cr1cbNGdrFq3b8GT7gu1U4uNn1nYib99xbD 8a1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=XXk3dL2k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp15-20020a170906c14f00b007addc9401dcsi11894878ejc.484.2022.11.08.02.51.51; Tue, 08 Nov 2022 02:52:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=XXk3dL2k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233405AbiKHK3i (ORCPT + 89 others); Tue, 8 Nov 2022 05:29:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232125AbiKHK3g (ORCPT ); Tue, 8 Nov 2022 05:29:36 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57CA3614A; Tue, 8 Nov 2022 02:29:35 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 01EB91F8BD; Tue, 8 Nov 2022 10:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667903374; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=42Wym6hzhZrHL5OTzyhJU3dom4Zp+KxcEH8YfQkDIFA=; b=XXk3dL2kcI3cUCEHnlBi+X3mJXJ/iOiZHahAhF39ojcDurjARdKOPBIL642UWdpvEJ592O O+PeIZEY6Frk+4BO+rVkzLme/PGXrfw06copVWtDMDuYDIKyBH1t6uF0yh4wht7pDofiSm q6V9GnVki532OqQHws4P4FoAfkNUF70= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 791932C141; Tue, 8 Nov 2022 10:29:33 +0000 (UTC) Date: Tue, 8 Nov 2022 11:29:32 +0100 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH printk v3 01/40] rcu: implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC Message-ID: References: <20221107141638.3790965-1-john.ogness@linutronix.de> <20221107141638.3790965-2-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107141638.3790965-2-john.ogness@linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2022-11-07 15:21:59, John Ogness wrote: > Provide an implementation for debug_lockdep_rcu_enabled() when > CONFIG_DEBUG_LOCK_ALLOC is not enabled. This allows code to check > if rcu lockdep debugging is available without needing an extra > check if CONFIG_DEBUG_LOCK_ALLOC is enabled. > > Signed-off-by: John Ogness Reviewed-by: Petr Mladek Just a small nit below. > --- > I also sent this patch to Paul as a suggestion. If it is not > acceptable, I just need to add an ifdef CONFIG_DEBUG_LOCK_ALLOC > into console_list_lock() of patch 21. > > include/linux/rcupdate.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h > index 08605ce7379d..65178c40ab6f 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -340,6 +340,11 @@ static inline int rcu_read_lock_any_held(void) > return !preemptible(); > } > > +static inline int debug_lockdep_rcu_enabled(void) > +{ > + return 0; > +} > + It would make sense to move this up before rcu_read_lock_held() definition so that the declarations and definitions are in the same order in both #ifdef CONFIG_DEBUG_LOCK_ALLOC branches. > #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ > > #ifdef CONFIG_PROVE_RCU Best Regards, PEtr