Message ID | 20221110073013.1302564-1-qiang1.zhang@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp776685wru; Wed, 9 Nov 2022 23:25:32 -0800 (PST) X-Google-Smtp-Source: AMsMyM7h+aytNl9HCIfxx0wuB5arNEXqirA92E9jFi0fhUoLz5dzNUAvA51n2IPNrY3G1K9EYYRs X-Received: by 2002:a63:df07:0:b0:46f:9c0c:8674 with SMTP id u7-20020a63df07000000b0046f9c0c8674mr1886175pgg.26.1668065132577; Wed, 09 Nov 2022 23:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668065132; cv=none; d=google.com; s=arc-20160816; b=rkbTWECE8VF/tyER+C1GDaJY5xr1bUHDZT5c5/zem7pq3Q3dhADpFQl5rdkCtFXzRF Ok8dGk9HcwECvAfPtuITJ++gTsZApIy4WIDC+6f7U50szgTcfUH9agSc28CgyoBGbzA3 1DOijNSsYjRpAwQ/QVkvfzDDtPPMsdTtJnUkYJ7uqMcCxkiD+Om9Tb9fT0N4xfoE+UFk DFCyPsO+sxCqHska0LClikNhMRMn2d6op0jASM35+EFDGo2hoVmFc7+7Y0NgnO99VZIi cE31SB8M5sdKBx4WPIi5XWcQtlHOjT8mFnwkWPjw2MWJpu++eEo7/ajRA58A0PbdqZUJ 13cw== 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=jXU2u464H/lNScwAKyyuOkHfvg065VXjW3jFxHrUIh4=; b=EG9Km25387/V7sKzcqfRHWqK4uugQqmWekD/QUibLMeP5AD8lpjgdUMFVJVzZi74Zm UHbcC7S5Bev5bKsJ0K/SQe9B5c5ZnRzn+J7ZYZmXDhjkpdGiJex15KRUIEb5tDcnlssM Bk5eX0zyEgPi0LfJahF51pTNs1OtroiUCbYo5i6atlXZ7XSDlkuxXQ3kRJFMjk6Hgu5F gmCTwnOSlnoGqZO2sq3TJNHbRyKiiooG3C67fENxB1Gqxa23yhDdxncd+zyNy6MW6tGD ZOXkduTV3W7PdyjttMxttuE47yq5HPaBbchIkj8Sl6IHhij/X/Nr8Ybb1Sc5mSk5UdFm /FWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eFBe8wjz; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e25-20020a62aa19000000b0056ea2b1b0fesi16923423pff.119.2022.11.09.23.25.16; Wed, 09 Nov 2022 23:25:32 -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=@intel.com header.s=Intel header.b=eFBe8wjz; 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 S232513AbiKJHYU (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 10 Nov 2022 02:24:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiKJHYQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Nov 2022 02:24:16 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A461A32079; Wed, 9 Nov 2022 23:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668065055; x=1699601055; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NpR3zgsRWqyqRv4WG8Mje9a0YXH5njFAug2x1iSvPYM=; b=eFBe8wjzIaYjKj8U1SQr225WeXjvJ/cHOXQzl0lHiSWiGFjn6N0UYeEu 74QrR1fZ+CsU3TiTuneI/2gnkETV7jmdzw375B/e8xGQmu7M+5tPU/GIr /HCbzA8FsPGjQ7GbqUj9ngcmY9ERRyy6O6JlDS9xm1aiNHzBLslFnaysu jlVEEm+dwVOmAntmpUkBF4B0ewEIkW33mmCszTri1UdRKVSJI5A867o7H 4ANZkiPKkS6WCfHDLqFtei03W7WEG3Q/yz3M49ZxEW1PDt2yPnPQwYzba Tm4yPxUBy8XvsznQafooEKmirbPSP5QC2JGUzEgI7/M+aZ50wfuCHTYe/ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="309950674" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="309950674" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 23:24:15 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="614994605" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="614994605" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.129]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 23:24:13 -0800 From: Zqiang <qiang1.zhang@intel.com> To: paulmck@kernel.org, frederic@kernel.org, joel@joelfernandes.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] srcu: Release early_srcu resources when no longer in use Date: Thu, 10 Nov 2022 15:30:13 +0800 Message-Id: <20221110073013.1302564-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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749093064494966261?= X-GMAIL-MSGID: =?utf-8?q?1749093064494966261?= |
Series |
srcu: Release early_srcu resources when no longer in use
|
|
Commit Message
Zqiang
Nov. 10, 2022, 7:30 a.m. UTC
When the "rcupdate.rcu_self_test = 1" is set in bootargs and CONFIG_SRCU
option is enabled, the early_srcu will be tested, currently, for TREE SRCU,
if "srcutree.convert_to_big = 1" is set, the srcu_node structure will be
allocated at invoke init_srcu_struct_fields() time, after the test is
completed, the early_srcu will not be used.
Therefore, this commit invoke cleanup_srcu_struct() to release srcu_node
structure.
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
kernel/rcu/update.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Nov 10, 2022 at 03:30:13PM +0800, Zqiang wrote: > When the "rcupdate.rcu_self_test = 1" is set in bootargs and CONFIG_SRCU > option is enabled, the early_srcu will be tested, currently, for TREE SRCU, > if "srcutree.convert_to_big = 1" is set, the srcu_node structure will be > allocated at invoke init_srcu_struct_fields() time, after the test is > completed, the early_srcu will not be used. > Therefore, this commit invoke cleanup_srcu_struct() to release srcu_node > structure. > > Signed-off-by: Zqiang <qiang1.zhang@intel.com> Queued for further review and testing, thank you! Also with the usual wordsmithing, so please check. Thanx, Paul > --- > kernel/rcu/update.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c > index 738842c4886b..a05e23648c6b 100644 > --- a/kernel/rcu/update.c > +++ b/kernel/rcu/update.c > @@ -589,6 +589,7 @@ static int rcu_verify_early_boot_tests(void) > early_boot_test_counter++; > srcu_barrier(&early_srcu); > WARN_ON_ONCE(!poll_state_synchronize_srcu(&early_srcu, early_srcu_cookie)); > + cleanup_srcu_struct(&early_srcu); > } > } > if (rcu_self_test_counter != early_boot_test_counter) { > -- > 2.25.1 >
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 738842c4886b..a05e23648c6b 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -589,6 +589,7 @@ static int rcu_verify_early_boot_tests(void) early_boot_test_counter++; srcu_barrier(&early_srcu); WARN_ON_ONCE(!poll_state_synchronize_srcu(&early_srcu, early_srcu_cookie)); + cleanup_srcu_struct(&early_srcu); } } if (rcu_self_test_counter != early_boot_test_counter) {