Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3955804rwe; Tue, 30 Aug 2022 01:44:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR7iQvw+DqJ0UqFnUVDqH3Z9xxUHCheWdfHU3ho9Qh/ISNXZCh4zx+WygbFBsgaLv3C7XfAt X-Received: by 2002:a17:90b:4c04:b0:1fb:2d28:bfb5 with SMTP id na4-20020a17090b4c0400b001fb2d28bfb5mr22146158pjb.42.1661849042518; Tue, 30 Aug 2022 01:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661849042; cv=none; d=google.com; s=arc-20160816; b=cumvUlKsctEOVYDJNqiL0ynrcGn37vVvRNllpTTzAnXYdfkBTmhC3fArrzbLazQs0/ fjUnzSHLKNUMchbsFrgIUn0qSG6uF6pxeHc956NrkBYfukOxT2pYmqP1HijYt6tIBbQ8 GOGeCvvmEiN+P59oEReeHWhCxiCj/dXCGD6O9zoaYc7y81Gc9/QxEFdmXPScXLyYAeVP rHOnn3m9o7JpAWKZ0foQ+qJznQkiyk6oowk64hIKITp5lD7D1ETbXdcBtdC6X3YG8g+Q xTLXff3cXVJKx14G0ME7K4bCASOqE1t+se2jDbdv473dNrsaNe2TgAUSg86kwrmfwU8E 2Ymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PQD5iXWHK3WUih59qqKay0FyKH0iWsF0VYfgZyTsWcs=; b=BR8MTlDVcjk9zXLz+KIKqnyke4o5ywSWcEpUhzdTo3hHM7Pd+Uo14/vp3c1uDj25b9 Tu5tA4C6DGVVa6w0n5XlF2Xcj0rOkzVr2A1LFbZ/+qrAOKzArN+RDSDSbBGcl3FXCud1 8i5Ps9088hnL/c5m7sAUdnLafFQxm83pjHUsSOuRtCIHijMgpNT36CmFO7QZ2Sto1n/V TdWZhA8wNvNwdyKs6yp8nR77aWzzFbQ4ios/UkAsEKrnQ/iRaGSbeh64oGVgcHFukxJh Iy1sf/701mocE9RZVillj5GCSkpA9T/N63vFJ4VTMShyPC2yAC/LI1+C5C1tfsZ7XzYu XnKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AMdaVOef; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a170902700800b0016d1a182e17si11193208plk.425.2022.08.30.01.43.52; Tue, 30 Aug 2022 01:44:02 -0700 (PDT) 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=@intel.com header.s=Intel header.b=AMdaVOef; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbiH3IZx (ORCPT + 99 others); Tue, 30 Aug 2022 04:25:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbiH3IZv (ORCPT ); Tue, 30 Aug 2022 04:25:51 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1031253000; Tue, 30 Aug 2022 01:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661847951; x=1693383951; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FM2Nw6OVv3oANgo8eVrCve+EM/odlJq6l1r72WRUiCU=; b=AMdaVOefmx3cat1jWPp1TxPxt+elMIwRs+K3p5i7rDGxRb7SEDcc4nEt 996zMz708/UXcjQbAcJetzsFbhCXuTz5J4pidbZniMr3VppKokDRUKaNh wbQF9P3UNvY3Ukiv2g6+htqQoOnfzajg1qtPpbIljpBfipaLDxaOFAtwJ lI2l44ynQTc3mcN32GDbpSvoEukdLktrog05TYhL+x2yxlAcJC3xjH8gb /kNjPP6JI7TmvYKlrgIfgEBG04oaZheZF5OUlZMUbx5De+B/uSbwI7Gav zbN14GU6XeAhhF+tOXSDCGD+Fwmk/YkJYLQTeYEfSpe81KB754xqjJYFa A==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="275517826" X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="275517826" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 01:25:50 -0700 X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="672751679" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.129]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 01:25:49 -0700 From: Zqiang To: paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rcu: Remove duplicate RCU exp QS report from rcu_report_dead() Date: Tue, 30 Aug 2022 16:31:51 +0800 Message-Id: <20220830083151.396561-1-qiang1.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 For PREEMPT_RCU, the rcu_report_dead() is invoked means that the outgoing CPU mask is clear from leaf rcu_node and has no further need of RCU, so invoke rcu_preempt_depth() return value is always zero in rcu_report_dead(), if the current outgoing CPU rcu_data structure's cpu_no_qs.b.exp is true, the rcu_preempt_deferred_qs() will invoke rcu_report_exp_rdp() to report exp QS. for non-PREEMPT_RCU, the rcu_preempt_deferred_qs() is equivalent to rcu_report_exp_rdp(). Signed-off-by: Zqiang --- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 6bb8e72bc815..0ca21ac0f064 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4276,8 +4276,6 @@ void rcu_report_dead(unsigned int cpu) // Do any dangling deferred wakeups. do_nocb_deferred_wakeup(rdp); - /* QS for any half-done expedited grace period. */ - rcu_report_exp_rdp(rdp); rcu_preempt_deferred_qs(current); /* Remove outgoing CPU from mask in the leaf rcu_node structure. */ -- 2.25.1