mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: neeraj.upadhyay@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	rostedt@goodmis.org, paulmck@kernel.org,
	neeraj.upadhyay@kernel.org, neeraj.upadhyay@amd.com,
	boqun.feng@gmail.com, joel@joelfernandes.org, urezki@gmail.com,
	frederic@kernel.org
Subject: [PATCH rcu 09/12] rcu: Provide rcu_barrier_cb_is_done() to check rcu_barrier() CBs
Date: Fri, 16 Aug 2024 12:19:18 +0530	[thread overview]
Message-ID: <20240816064921.57645-9-neeraj.upadhyay@kernel.org> (raw)
In-Reply-To: <20240816064730.GA56949@neeraj.linux>

From: "Paul E. McKenney" <paulmck@kernel.org>

This commit provides a rcu_barrier_cb_is_done() function that returns
true if the *rcu_barrier*() callback passed in is done.  This will be
used when printing grace-period debugging information.

Signed-off-by: "Paul E. McKenney" <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
---
 kernel/rcu/rcu.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 38238e595a61..caaed27e476b 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -255,6 +255,11 @@ static inline void debug_rcu_head_callback(struct rcu_head *rhp)
 		kmem_dump_obj(rhp);
 }
 
+static inline bool rcu_barrier_cb_is_done(struct rcu_head *rhp)
+{
+	return rhp->next == rhp;
+}
+
 extern int rcu_cpu_stall_suppress_at_boot;
 
 static inline bool rcu_stall_is_suppressed_at_boot(void)
-- 
2.40.1


  parent reply	other threads:[~2024-08-16  6:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16  6:47 [PATCH rcu 00/12] RCU tasks updates for v6.12 Neeraj Upadhyay
2024-08-16  6:49 ` [PATCH rcu 01/12] tools/rcu: Remove RCU Tasks Rude asynchronous APIs from rcu-updaters.sh neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 02/12] doc: Remove RCU Tasks Rude asynchronous APIs neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 03/12] rcutorture: Stop testing " neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 04/12] rcuscale: " neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 05/12] rcu-tasks: Remove " neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 06/12] rcu-tasks: Fix access non-existent percpu rtpcp variable in rcu_tasks_need_gpcb() neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 07/12] rcu/tasks: Check processor-ID assumptions neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 08/12] rcu/tasks: Update rtp->tasks_gp_seq comment neeraj.upadhyay
2024-08-16  6:49 ` neeraj.upadhyay [this message]
2024-08-16  6:49 ` [PATCH rcu 10/12] rcu/tasks: Mark callbacks not currently participating in barrier operation neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 11/12] rcu/tasks: Add detailed grace-period and barrier diagnostics neeraj.upadhyay
2024-08-16  6:49 ` [PATCH rcu 12/12] rcu/tasks: Add rcu_barrier_tasks*() start time to diagnostics neeraj.upadhyay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240816064921.57645-9-neeraj.upadhyay@kernel.org \
    --to=neeraj.upadhyay@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=frederic@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neeraj.upadhyay@amd.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®