Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp165588rdh; Mon, 18 Dec 2023 15:20:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEo0931VMrTUiL+GHKMaOykBw3+9NbDT5DgRDm7OeDNlqXk+bVAeJtjM1LGtgwMkh7iVBXb X-Received: by 2002:a05:622a:164d:b0:425:4042:f44e with SMTP id y13-20020a05622a164d00b004254042f44emr253799qtj.50.1702941612679; Mon, 18 Dec 2023 15:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702941612; cv=none; d=google.com; s=arc-20160816; b=0rpsFmZSqdJRu8JWO7MeUcJ6hqNWi5k+mzqahzQecNN5fxdSh8i+ssOKklckZSHKzb j3BYDfPigQMsW9cWEAMiuCg0PudPYUye2W6siTK2j4esTUbpNfCxQuImMAPtfd2BcBmx tm6KgE5glGcJf3gGB08NqV1NTJCrNijD4ZoBkZiKgH4ZEP1TnBbDpEHbYeGOoLBxrCvX 5U9vCcY/dJoXV1kwNGD5Cj3R/dZw1G577pSJUnAuMuzcqR7wwzjE8jd6Qxve15N/v1Dh ZpD69H+u/ByM6G+X4MpDE/cgoLL0jZKuB1LpIFCxF42C13j9mcEuNr9khDpiZdfKVQd/ OKUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4gRFC094GsoLU4fYXEtJbe2p4KyIYghrmDbh0DBntrE=; fh=xvjKaM6hmtHqnOhs670mkmt5SmfrGcW6BwluoXDWXqs=; b=YuAlycaxw5xVzrkHF4bPcEEF0aV3PmgseOYPHqc9BBKChJCxwOU99PeArVpPp+I/jC 15fGLgDAKfd3WH1p++YCkdVgcLBxL4zOfEOSTYGu30Sv2rDqwZ30upNLgi6ud+NAEneu h7+OUHEx6Fg5WgyCyZwaDer1VgZiJ2t7NH/gn3qfgS8C0xOqYMtAoqGrk/tKR0ce4UPw 3EfkHOP9/aVRpUwIHTuL+k16fMsUg6d0fXggBdU2GhpYxyuD4PlLrLW0xDmrGhjQafMn dSLEkbu80l1fT8WKKYjQAc5i1Im9GK86pJZfM+aGeRpvK74KbL8TtIsTSk+Txa2MYb86 sa2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TuJESOJ2; spf=pass (google.com: domain of linux-kernel+bounces-4478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ci11-20020a05622a260b00b0042393dc9d39si26731300qtb.102.2023.12.18.15.20.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 15:20:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TuJESOJ2; spf=pass (google.com: domain of linux-kernel+bounces-4478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 72E7E1C2147A for ; Mon, 18 Dec 2023 23:20:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5F4D7994B; Mon, 18 Dec 2023 23:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TuJESOJ2" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 149B1768FC; Mon, 18 Dec 2023 23:19:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8BCEC433C8; Mon, 18 Dec 2023 23:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702941572; bh=x/5xI2oI/qJM/7tPaUtUa288bDEyvUKnDytjUeL9Kh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TuJESOJ2ve3eFm0UYRg2rZDQWAy4X4nBL5GMaqztfenpsittW/7VpTa2Fhrd4QSGm +4WtgAd5/4b0ttyCzM/F0tWSKiBtHuIgRSmPJC+MNF4qQK7AzbDFLquasL5HIhBvko 2od7mFYsC3y7Z9lM/13oy3C5Ds0lgasesvO74eNVZbI0UDBt/hrYn+2OcZE1v8lBsQ F1o10ntJRcveoVk9Uqd/OvHDDEpWoLi5bGtodA9+4g8SXSWR7E84jbSCX3xnEqp+ta tuxCuQSKug4vCynxWCzXdsfwjFQS+o/dd0A4bRCEumq3jmNKrGJFoV6WBRWwEugbtK 0X6UvUFT1qdUw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Zqiang , rcu , "Paul E . McKenney" , Thomas Gleixner , Peter Zijlstra Subject: [PATCH 3/3] rcu/exp: Remove full barrier upon main thread wakeup Date: Tue, 19 Dec 2023 00:19:16 +0100 Message-ID: <20231218231916.11719-4-frederic@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231218231916.11719-1-frederic@kernel.org> References: <20231218231916.11719-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When an expedited grace period is ending, care must be taken so that all the quiescent states propagated up to the root are correctly ordered against the wake up of the main expedited grace period workqueue. This ordering is already carried through the root rnp locking augmented by an smp_mb__after_unlock_lock() barrier. Therefore the explicit smp_mb() placed before the wake up is not needed and can be removed. Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree_exp.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 2ac440bc7e10..014ddf672165 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -198,10 +198,9 @@ static void __rcu_report_exp_rnp(struct rcu_node *rnp, } if (rnp->parent == NULL) { raw_spin_unlock_irqrestore_rcu_node(rnp, flags); - if (wake) { - smp_mb(); /* EGP done before wake_up(). */ + if (wake) swake_up_one_online(&rcu_state.expedited_wq); - } + break; } mask = rnp->grpmask; -- 2.42.1