From patchwork Tue Sep 3 16:33:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 13789074 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 F00F918C33F; Tue, 3 Sep 2024 16:33:19 +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=1725381200; cv=none; b=dIne5kJuhfrxhy7JWX4x2U4GsRLmyEta7I8JOX4360qX2OAs19wsZJiSarBMC7tflonKbMYh4HYkS8cW/R2SqkMSa8tgHkUTP4s0QwQE0O8SEMLp8YLL7CWe8cKc51yVmiCC1hBN1r+37sUp1CS8aj5dZNKmOMk70Sqzp7BDvL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725381200; c=relaxed/simple; bh=3DG9pdyV1Preno7qpHBHmUd7thJcdcxzKfiRWWD6DFE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ddu0j+lrt7UVnn7iqspV2VQNQbAsAPA6cBf5RVcRpXbTyLd/pJRkxF/dquyAToP7Z2aztfCx5SJUndtruMvHsMhhuj5znj2kwZTGmn9sovNOF8LVZ4OHGKGf6tLIPeJsFUfh/QYtBdslV7TBKa9om/4Hhda520TCUC7BhSMXfsE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IGB+2Pmg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IGB+2Pmg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B009FC4CECD; Tue, 3 Sep 2024 16:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725381199; bh=3DG9pdyV1Preno7qpHBHmUd7thJcdcxzKfiRWWD6DFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IGB+2PmgepYuUBPk1sj9DsN9SamsBUmey4Ce23U7Cyyy2ytkSOou0kYzh1+WZdVCS VUcttkvfKVhd4YKvLzARRVEQN9F0otLlZBCuiikkG7684VVIpLY7vnIiTnli485Fym jtxyBQfz6FJg0R4sO6pe5ubIfoXdkk7yzPFi+U2N5HU+uSmdZ+3wnQigEZd8TZqFti yyil5gzb17nu98iI3RTPloBlLu+Q3a55dGRj2Y26gKnAPT1HzNteN51Iti6M0bYMnI VqB8WAexxe7HTmNHX1uVmtvgc0cBdw+lXwkmgkt9mIkfvZNvYKMqb98euELQTu4tT/ 1hLdXfxnbgDNA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 46DEDCE2254; Tue, 3 Sep 2024 09:33:19 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, Alexei Starovoitov , Andrii Nakryiko , Peter Zijlstra , Kent Overstreet , bpf@vger.kernel.org, "Paul E. McKenney" Subject: [PATCH rcu 05/11] srcu: Standardize srcu_data pointers to "sdp" and similar Date: Tue, 3 Sep 2024 09:33:12 -0700 Message-Id: <20240903163318.480678-5-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <26cddadd-a79b-47b1-923e-9684cd8a7ef4@paulmck-laptop> References: <26cddadd-a79b-47b1-923e-9684cd8a7ef4@paulmck-laptop> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This commit changes a few "cpuc" variables to "sdp" to align wiht usage elsewhere. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- kernel/rcu/srcutree.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c index 06ade8ca7804f..54ca2ea2b7d68 100644 --- a/kernel/rcu/srcutree.c +++ b/kernel/rcu/srcutree.c @@ -438,9 +438,9 @@ static unsigned long srcu_readers_lock_idx(struct srcu_struct *ssp, int idx) unsigned long sum = 0; for_each_possible_cpu(cpu) { - struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu); + struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu); - sum += atomic_long_read(&cpuc->srcu_lock_count[idx]); + sum += atomic_long_read(&sdp->srcu_lock_count[idx]); } return sum; } @@ -456,11 +456,11 @@ static unsigned long srcu_readers_unlock_idx(struct srcu_struct *ssp, int idx) unsigned long sum = 0; for_each_possible_cpu(cpu) { - struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu); + struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu); - sum += atomic_long_read(&cpuc->srcu_unlock_count[idx]); + sum += atomic_long_read(&sdp->srcu_unlock_count[idx]); if (IS_ENABLED(CONFIG_PROVE_RCU)) - mask = mask | READ_ONCE(cpuc->srcu_reader_flavor); + mask = mask | READ_ONCE(sdp->srcu_reader_flavor); } WARN_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && (mask & (mask - 1)), "Mixed NMI-safe readers for srcu_struct at %ps.\n", ssp); @@ -564,12 +564,12 @@ static bool srcu_readers_active(struct srcu_struct *ssp) unsigned long sum = 0; for_each_possible_cpu(cpu) { - struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu); + struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu); - sum += atomic_long_read(&cpuc->srcu_lock_count[0]); - sum += atomic_long_read(&cpuc->srcu_lock_count[1]); - sum -= atomic_long_read(&cpuc->srcu_unlock_count[0]); - sum -= atomic_long_read(&cpuc->srcu_unlock_count[1]); + sum += atomic_long_read(&sdp->srcu_lock_count[0]); + sum += atomic_long_read(&sdp->srcu_lock_count[1]); + sum -= atomic_long_read(&sdp->srcu_unlock_count[0]); + sum -= atomic_long_read(&sdp->srcu_unlock_count[1]); } return sum; }