Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1016921iob; Fri, 13 May 2022 19:46:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyB92oyIbL5AJaRTxTo1GBrqn7BNjP2XqEj8H2X5aWFqnzfRePDSkBOL1ywgmLZX/qMMWCn X-Received: by 2002:a05:600c:ada:b0:394:30f0:5b24 with SMTP id c26-20020a05600c0ada00b0039430f05b24mr6984043wmr.57.1652496380218; Fri, 13 May 2022 19:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652496380; cv=none; d=google.com; s=arc-20160816; b=ZNJC6QlJ6TwPCOXYJxWStXU/r80d4aZj0jXDE2Qc56zT+gIU4XmkC7A2aXIXrrBqrr TKZzgzmSCW1NZS/KxCL7jvMG42rEpvnq0wX/MEluJlCBWD7iALOzuJpghDWPezKo2C8U ASbDqgsqh4wFXmYyEJE4jvxA6OEz80m/H1uQxC0O3aULPZ+a7ksk99F9FIfkFssV5Xrz jQxUSitqnCtxmM18/3mASL/mlmFJaKTtIsjGY815uDMtaJH9T6Bs0C+sIUPHly+1Jxss WRqnTzkJqXYkG4mpWFiRHP2aJjakKD3m26KGcnRDY4VGjHKV0HYJsRf/rwjmMw9wFi3I 4jYA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=07V71Rn75Do8JLFzEZ5G57dMggDDyiGwg2N18lriEXE=; b=tLIBYCTdou9hiO04qfWF7BXwNx/s4PxqMAyPFFu6o8ixmm4U7j9uI/oiaQ8uHVtCR9 S78ZgOq+uQ/M0He76AzMyCilUoYdnPsMUy8qTRe5ka2apaIgRrjC4w9BNGbWd8HBPaJB SkF3tLkZNheTm9HJEg4PVbIZmbVNuLmnNJ9r60eiEy0tYK84AqbNUspmfDee5uZB9JG0 iTkAXtksnGybV3annlA56vAn8YGEim0Lyta/RYtrhJjeTgj2/STYCnBojLrya0z6a+zO xTzd0ovg0QT47n8VwJfgBXHkjpCUjXvqyZ3VzMZDpKglbaFJAaoggt80UiUEWM++X/Me 7OUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IvK0BxYH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j26-20020adfa79a000000b0020c5e3088f4si4402877wrc.356.2022.05.13.19.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:46:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IvK0BxYH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D84B35FAD9; Fri, 13 May 2022 16:33:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359743AbiEMAuA (ORCPT + 99 others); Thu, 12 May 2022 20:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357287AbiEMAt7 (ORCPT ); Thu, 12 May 2022 20:49:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E559116D5E8; Thu, 12 May 2022 17:49:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A6F17B8200D; Fri, 13 May 2022 00:49:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E9D0C385B8; Fri, 13 May 2022 00:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652402996; bh=g0IhZHLcypRMQEW3o9PkdjskIdxfRPbz9rwZfz1QTYQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=IvK0BxYHQaxctgykLUVShK8eT+1vvPT8PGzmI905HRkCgbpUbJj/RzHFDrw78jARV wTpwMVkhtD+lIrAfcPZdiachNhQgmFKlHcon8p/I0DTrvGE8OzL6myB62/fOdIM2m7 a3JOZCFRvMtnZ6VOFmeAx+miph2rgA1zJJCsKtLpwykj1wd2BefCaW50HJ22eZ07kY voOexYYHRbMpF5fIVXypQquRjRsIyAx827pjzBaqu3g7MzOYGTvUik2k3n7Nh8/CAp dfpXSYV0AOP+z7uSTZA4G2pIJOoXDezNLFcQYIKLJrma+lefOm+mQh3fB3o5czUapv +0GWy8BAqrdsg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E92075C051B; Thu, 12 May 2022 17:49:55 -0700 (PDT) Date: Thu, 12 May 2022 17:49:55 -0700 From: "Paul E. McKenney" To: Zqiang Cc: frederic@kernel.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Remove debug_object_active_state() from debug_rcu_head_queue/unqueue() Message-ID: <20220513004955.GC1790663@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220510030748.1814004-1-qiang1.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220510030748.1814004-1-qiang1.zhang@intel.com> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Tue, May 10, 2022 at 11:07:48AM +0800, Zqiang wrote: > Currently, the double call_rcu() detected only need call > debug_object_activate() to check whether the rcu head object is > activated, the rcu head object usage state check is not necessary > and when call rcu_test_debug_objects() the debug_object_active_state() > will output same callstack as debug_object_activate(). so remove > debug_object_active_state() to reduce the output of repeated callstack. > > Signed-off-by: Zqiang Could you please post the output of the dmesg output of a failed check with your change? Thanx, Paul > --- > kernel/rcu/rcu.h | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h > index 15b96f990774..0604ecd16627 100644 > --- a/kernel/rcu/rcu.h > +++ b/kernel/rcu/rcu.h > @@ -179,27 +179,16 @@ static inline unsigned long rcu_seq_diff(unsigned long new, unsigned long old) > */ > > #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD > -# define STATE_RCU_HEAD_READY 0 > -# define STATE_RCU_HEAD_QUEUED 1 > > extern const struct debug_obj_descr rcuhead_debug_descr; > > static inline int debug_rcu_head_queue(struct rcu_head *head) > { > - int r1; > - > - r1 = debug_object_activate(head, &rcuhead_debug_descr); > - debug_object_active_state(head, &rcuhead_debug_descr, > - STATE_RCU_HEAD_READY, > - STATE_RCU_HEAD_QUEUED); > - return r1; > + return debug_object_activate(head, &rcuhead_debug_descr); > } > > static inline void debug_rcu_head_unqueue(struct rcu_head *head) > { > - debug_object_active_state(head, &rcuhead_debug_descr, > - STATE_RCU_HEAD_QUEUED, > - STATE_RCU_HEAD_READY); > debug_object_deactivate(head, &rcuhead_debug_descr); > } > #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ > -- > 2.25.1 >