Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp408368lqb; Tue, 4 Jun 2024 15:28:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWq4Um1kfs7g5O7qfbTeRYgwRwtQ248EYvEUtxTS9TQfFjul5Br7atf0IZbPSmOP/4gdDSZNz/t1/b6oNlOpjjhf8nM3ECxZlcBixxBDw== X-Google-Smtp-Source: AGHT+IEc1beqIe94g1A8IfrJeKL0WL1jOodNbpAFScWHOhpZBuMPNm69gtxplEqOduuXn9jc4fgK X-Received: by 2002:a17:903:41c4:b0:1f4:8e8e:d359 with SMTP id d9443c01a7336-1f6a5a84923mr10043655ad.67.1717540105005; Tue, 04 Jun 2024 15:28:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717540104; cv=pass; d=google.com; s=arc-20160816; b=GUzcPRTkMa7RlsK91iUz4JU6numqQ4YzW1YekdaBQAVfSdvPg/QMzdAQVhg7mQQqit VDcH2fI+NN2UwPTdUfD/yO9hHg/2fT7FT/fHuJdMtsRckJCsws1klblD8UcEK4b5wham Jlip9fGp0qoDj2NYDFtJLXQMMr0z93uhAMUt9usYLnTCNa1PCaDAVqviHDiEXmYXuZ6V wZEf+DGakxXtlGRr/0CYI7jeOaMxGo/Eb5UswxsijBxNXK/SgTZ4efZ7sYtcOtoA0E1h Kw85leudQRGiN7haInH0xLVt0GQObETOliFuN6EDBAZ9SULMzri9+AZletMP/0r4d8xs VaiQ== ARC-Message-Signature: i=2; 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=SnbJ9MdsK99xYFJy8Y6rT1Qc3oCbAgkpkUvKDBO8m6Q=; fh=j/6jXqcObt7Pm1W5aZvD4EQwbdi5JXSIgZt68BnsQ8s=; b=ngUOr71LP/tPbQMqtl4gETxnRJcPejIM5kMbMck0sH/B65F7SPF+8NxqM13gaEFuNc emBRttkTpIyfuw6phHvvM8YxIDgWspKU91JH2FFV0veJw4C0vHOvuI6asjyfS6fPBZGd 9TNPq4tun4yO86j2hWAO3RVdK1g1uEpt3LwMMV/29p+AzRY+xxphdxD3J7KE5JbpHIaG GzChpim7ZgBtF9U7EX2i5b2pYB3xaDSKEW47SxvjckSlmk1zFNGnO5YTJ32pStoSbmdG st89piPB7tCqrUiyX5CrahdORyncm6Z4oE1KAh4/mnAq5cBDWGn+DXLo6/NppRpEx/E7 ONBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dPd4guF0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201476-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201476-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f66470e95dsi55234645ad.380.2024.06.04.15.28.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 15:28:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201476-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dPd4guF0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201476-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201476-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 44B592877E2 for ; Tue, 4 Jun 2024 22:27:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D49614D431; Tue, 4 Jun 2024 22:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dPd4guF0" 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 AAD1B14C5AE; Tue, 4 Jun 2024 22:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717540014; cv=none; b=BEdccXzWt5vkLQqCLAklctOeNOFNGZVBPyP+I/fMr+/XFqcL+XGwUTbbYv57noxkd3NC21Z4ovfCQQeT65vSYHQS1L4GT7KweTQpX0fr0qXsJuo3JyO4ZULSa3PH0ulj5GmbM6AH7TfZVaJAPldL7mXs8FQ7QybSo/oFIAXQ6lE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717540014; c=relaxed/simple; bh=i403K4lRwrOOtPyPhCFF+YfWbFsrii2TF1tAnWab5XE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tv0AAebLQllHb69+UwbQf/HJkBr7fYh56jN24luCmUxr901aa/198GRELebD+Qyqqx8jSy/lNHqz6Q+6txpmso9TCvr65plGfreyp707hOZfSSCBt50c1/bxRXm75GHCRaosctiYk0fpxG7aiYqxZobJIiqABfGQSS9mwzgzoJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dPd4guF0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60B62C4AF0B; Tue, 4 Jun 2024 22:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717540014; bh=i403K4lRwrOOtPyPhCFF+YfWbFsrii2TF1tAnWab5XE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dPd4guF0RRmMpV+EL05Bi66m27gUk5t/z4GZ848oqnXCHYRdc+dql67eEOFW51XD9 AphaFbKSiXDlK15IsJmsO39QzweI4OvKMKuC/5OQjHKGndgmoSIfDxurzR514D4d22 7pF9kApYJvuB0KU3aF9LaiqxrLeg+dQ94DxARkj7o4rvZ49Zv22uYAB2krlr6rN/b/ qPex9HHIAxZ8gv2383gypqCwenKxslp5H711gIrz9sy8T+39h8Q5Q5Y6j3EVJPVXm7 strtTgJfbToIak0svQZ7iXtyCfZ98XIHfIetbWsmlboBX0Q0Ma9MazQavAB3gPkd8N 0TiPsaBd48Z3w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id F35B1CE3F27; Tue, 4 Jun 2024 15:26:53 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, Frederic Weisbecker , "Paul E . McKenney" Subject: [PATCH rcu 4/6] rcu: Remove full memory barrier on boot time eqs sanity check Date: Tue, 4 Jun 2024 15:26:50 -0700 Message-Id: <20240604222652.2370998-4-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <81f4e616-8125-4934-a8e2-fd5beae90995@paulmck-laptop> References: <81f4e616-8125-4934-a8e2-fd5beae90995@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Frederic Weisbecker When the boot CPU initializes the per-CPU data on behalf of all possible CPUs, a sanity check is performed on each of them to make sure none is initialized in an extended quiescent state. This check involves a full memory barrier which is useless at this early boot stage. Do a plain access instead. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1a6ef9c5c949e..9fa6d2b557d6c 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4772,7 +4772,7 @@ rcu_boot_init_percpu_data(int cpu) rdp->grpmask = leaf_node_cpu_bit(rdp->mynode, cpu); INIT_WORK(&rdp->strict_work, strict_work_handler); WARN_ON_ONCE(ct->dynticks_nesting != 1); - WARN_ON_ONCE(rcu_dynticks_in_eqs(rcu_dynticks_snap(cpu))); + WARN_ON_ONCE(rcu_dynticks_in_eqs(ct_dynticks_cpu(cpu))); rdp->barrier_seq_snap = rcu_state.barrier_sequence; rdp->rcu_ofl_gp_seq = rcu_state.gp_seq; rdp->rcu_ofl_gp_state = RCU_GP_CLEANED; -- 2.40.1