Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp962882iob; Fri, 13 May 2022 17:52:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKqvk0RvCixT14YuabxaCPyTDGa7efrC/W7wM2OsKVCYxC/bdn92+DwNTGxwgJLZqJsTA9 X-Received: by 2002:a5d:6d0b:0:b0:20c:4ec7:8e84 with SMTP id e11-20020a5d6d0b000000b0020c4ec78e84mr5745974wrq.281.1652489551874; Fri, 13 May 2022 17:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489551; cv=none; d=google.com; s=arc-20160816; b=Ats6az0ybFPHlWUS8g/VilPZ3i0JW4xwlG8k/mdhptrmUyQUJSbshnGnUPsDc+5QGz IjFNmMxCP3svK4WezmrEoyxQHGRaQaqzey+95BiJkLvvyFX9D/4mMKxVacYNe1TUafVm 90c9YYtyc3UpzBAw0K8kNiZFi3Ot82rk9u2sZFCMiUwFQcsidTVl0XkWaBfHHPD0ZS+m 5zEnuDYY1p0vBZapi/s+280eLvBgZtbUSW3GZ+ug35bBgdZue/2ytbom0zD4Yw4/Fsbd 9nzR9Li3mSQhiMk/NdFe2u1XE6wwjQl6K8lkI5tUoWgOhJdbb5kG2I8T2dmAyqIe7qep Nc8A== 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=+ZVAxaN1QzoMqa3HEJM0VzVlxEf6FXv77KfcJPI54bI=; b=BKhGt3L/SJ0ldbjifLRK8jtp3ZNqdmNXUC7LzuIDn0rDoCoBE4jxJYgLI7F2sgxt8Q azUIdMNNhhqfJcw2UTMZ2zPUOg8ulbmt5fyCrGHXdq/lLCID3TnpUk4Nmi1TbM8v6zFZ k8EVbah3gU8mW047LrhCx361E9uq/Yaol9KPTMsLcmarLU7Ky90SjzcG2epnS5Vy1Na0 9F5woBXgdYh/MLYRtxlwCuv8vGmr8I1EzEXZ21zsUQ72cTfZtgfuUBrD47y99ljlYI8U YL5PUEqd/D23hCeiMtAkt4CfHOM3DgbEbgLmU5XcAlvsdGm94iQTSle29ZpGfrznMe4J qkIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=S9gJlVHB; 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=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c12-20020adfed8c000000b0020aa9a54113si2989538wro.127.2022.05.13.17.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:52:31 -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=@intel.com header.s=Intel header.b=S9gJlVHB; 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=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7899347A72; Fri, 13 May 2022 16:29:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359769AbiEMAnD (ORCPT + 99 others); Thu, 12 May 2022 20:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359748AbiEMAmy (ORCPT ); Thu, 12 May 2022 20:42:54 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67B3E606CF; Thu, 12 May 2022 17:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652402573; x=1683938573; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=f0Bj2hl1ZLW1ooL5JR+fXxS9kZj/CvEAmF8lk44pGEQ=; b=S9gJlVHB46R2JI1Y+nFNIH02KeCvJev2v8WvrGtasSsvoie/ZtKBp2yB igye8QY/9naEvhMbRZZLN1+FS66SPNJ5Cqp5kQDmN8vBPIcbiOW87Gu9l 0mvoq+eSdSY//2sBEXr577RibuEhPlcwmQzknDK5KxuBR4DoDDyUMLwGB 2xyDebH6CVmUIz0n2hZp1M88G7mrmkqvZ+XINPYYcygwrpgcXA60pGWfV ysF0KPOXSEyBpkOMKXNt2YFEI6szbe9xag964efYiFFM103JFu0gvxpY2 sUaq5cLmx3DFgCFrk/vxWnl/uSUAVydjvBsN5lxLvxeqUzLYRJWTmK+09 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="250707258" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="250707258" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 17:42:52 -0700 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="594954182" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.125]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 17:42:50 -0700 From: Zqiang To: paulmck@kernel.org, frederic@kernel.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rcu: Direct boosting gp_tasks for strict grace periods Date: Fri, 13 May 2022 08:42:55 +0800 Message-Id: <20220513004256.465233-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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 If the CONFIG_RCU_STRICT_GRACE_PERIOD option is enabled, the normal grace period will be treated as expedited grace period, the gp_tasks that block current grace period needs to be boosted unconditionally, therefore this commit adds Kconfig check in rcu_initiate_boost(). Signed-off-by: Zqiang --- kernel/rcu/tree_plugin.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 99cde4c94769..a60f2edf8e59 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1159,7 +1159,8 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags) (rnp->gp_tasks != NULL && rnp->boost_tasks == NULL && rnp->qsmask == 0 && - (!time_after(rnp->boost_time, jiffies) || rcu_state.cbovld))) { + (!time_after(rnp->boost_time, jiffies) || rcu_state.cbovld || + IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD)))) { if (rnp->exp_tasks == NULL) WRITE_ONCE(rnp->boost_tasks, rnp->gp_tasks); raw_spin_unlock_irqrestore_rcu_node(rnp, flags); -- 2.25.1