Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3296875lqo; Wed, 15 May 2024 05:54:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL9ScDiaOIYbGIJSwD4+3Mz6MIZldpkfu5AcWYPyya9v+0JFdBcopdVFPsaoTAf6Kz6vIV8uYUw8L1Tm7k9Xnb/6XcsU24Vo1fH4/exw== X-Google-Smtp-Source: AGHT+IGGeRU+QFdq+1iXdMsY12Xh5dpOLyfMB2aVr8yt9xEqnVgzvYg7njWDhqU1BvwjRoNtYjg6 X-Received: by 2002:aa7:88c6:0:b0:6f4:436d:fd1c with SMTP id d2e1a72fcca58-6f4e02d386emr18336350b3a.16.1715777672850; Wed, 15 May 2024 05:54:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715777672; cv=pass; d=google.com; s=arc-20160816; b=rvmB9TD1o8hUbgyIN4gzTtw5f0ekD7HhMZ0ai0Oi76njPXTR1ynBCWusHYPS9eXyrU yHD/woHXWrVtdniluy7tIv5GhstoWstzFYp1F3N8QVP70wk4/MTOaVJC2BDG2uB4Phv0 HPd8U5s+Y08LnwGYZvsCk7+HSVwyOPEODAHlgWdTzRHcvKVGu45vou7Dfg+BBuPliRCk TDpbKfNAPqWPk+sY8fXTA9kyqTt9FHgjhqOJNwrmJz3bOTGN6cHOfSnWTEOVBn5z20MO DxtRZzbhGCuiID2NCEuPAwAifaMiLX6B4pOCZOZHyVHxVwHhreuHqLi07+FWyG+5C865 6ylA== 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=BtyNp1za3To1fEv/tGDN0Lx3pO5VC1quKtlqOEN3iKw=; fh=y7YWp49TGn1SKctwYHNRFImp1RqPEFQizTwe3vKGdPo=; b=iPZIUdmVZq5MFnbi+iPIkBRE+MIUajeOoFwi4uYrqtIEZRLD+Uw+4ovKF4fjTiT4+z GMkyM/cmswtE4xh014pfBWZERQlG7skekylNynF8khR1fZaypqs0qh5h8ucqIAzp5rg5 CU4+4d/jmP4rS1eStjx7Ls9xwJ3HWVi6Z8f6znc8dcATbUE8RHxzPek5bE39a4xXa+jb S00wIdatY6ZvjyeBw29Y0KI8I2yPrmVT92FlCa3kWwIGoWUmRPdSBjKlENkcOPsmhv3x 1+OwiKuyUKb5KVScHlANBj3Zs2fDYPIAIuYWA2Op61rTLoGAYHcE6urfQMgZgyl8bFmT pLkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jk/IArrO"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179858-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f7038si13229782a12.393.2024.05.15.05.54.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 05:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jk/IArrO"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179858-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 59A8E283FAD for ; Wed, 15 May 2024 12:54:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B05DC129E74; Wed, 15 May 2024 12:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jk/IArrO" 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 D451812880A; Wed, 15 May 2024 12:53:47 +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=1715777627; cv=none; b=r1tF+6t3Qkg8Ju179BjxMSNbfcwQuDy42L6SOHn4cPy2TQogV8PLF40lk7812NpgZpUrhLVCME2EwaNhBcaKgC1OVFV4cUZMBg20QaUQFN37P8ojupw2Xd9FccvWRqw/7qwdjfV6SAG9wHwOm9Va83WKjlaCgMDJ0J7NDaCepPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715777627; c=relaxed/simple; bh=Cwf7KVnfd1lPdYZIzVZjhOBDZCNVDm3+eiHPehIQsUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MD0sMQXzC04gbrhwwLAPmIG4+3JCcwaJadff0ipzVaaN0jeHQCiHtgJ2Uxyo7CA23FikpQszrzkKR4r1J12LsXrAKIwiYRORHbSl/rXCKwCFZ3rdi4vio/dlGpf3GSYCKwJPw3vrsIFE0+/ggdNeo2ovsQaEIquIeUyGSqAlEPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jk/IArrO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A9D6C116B1; Wed, 15 May 2024 12:53:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715777627; bh=Cwf7KVnfd1lPdYZIzVZjhOBDZCNVDm3+eiHPehIQsUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jk/IArrO6/Ocivft4HDWBiiKfGZW17EWtQmnaEY6IvqGqfzXtA67ivHh4gIxMnIu9 rmeRvHRY20SaosNvaMYQK2TDaKrwoHmbRw3veWnYz4JVRJzSWU5XBlxpN52ALGZXG8 ySlFelKvcW5WE4wYzANVet9cLfTwNb/H58xl3TFMkMo6/bqfN3+UCfauQT2gBgUT8G NhJQtR3S9Q6+b5tGKHulGmML5Fcuc1F0zydSyayp71ZEgmr8KvHwh8Ve/En0gtilYT 4zC/NpYuWhh54xMrmEyGqRfIFbjxf94J0xM1Q/a0LKcvsvrVHWmzqPYEv2LD/DCNQF Moq/KJ+/cwo/g== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Valentin Schneider , "Paul E . McKenney" , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Zqiang , rcu Subject: [PATCH 4/6] rcu: Remove full memory barrier on boot time eqs sanity check Date: Wed, 15 May 2024 14:53:30 +0200 Message-ID: <20240515125332.9306-5-frederic@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240515125332.9306-1-frederic@kernel.org> References: <20240515125332.9306-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 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 --- 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 f5354de5644b..02f6f3483482 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4812,7 +4812,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.44.0