public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH rcu 3/6] rcu: Provide rcu_barrier_cb_is_done() to check rcu_barrier() CBs
Date: Thu,  1 Aug 2024 17:34:23 -0700	[thread overview]
Message-ID: <20240802003426.4134196-3-paulmck@kernel.org> (raw)
In-Reply-To: <41c68c6b-2c55-4c2d-ab70-f2a5b38eb374@paulmck-laptop>

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>
---
 kernel/rcu/rcu.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index f035fd4e579b4..feb3ac1dc5d59 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -252,6 +252,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-02  0:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  0:34 [PATCH rcu 0/6] Add RCU Tasks diagnostics and documentation Paul E. McKenney
2024-08-02  0:34 ` [PATCH rcu 1/6] rcu/tasks: Check processor-ID assumptions Paul E. McKenney
2024-08-14 12:16   ` Neeraj Upadhyay
2024-08-14 16:13     ` Paul E. McKenney
2024-08-02  0:34 ` [PATCH rcu 2/6] rcu/tasks: Update rtp->tasks_gp_seq comment Paul E. McKenney
2024-08-02  0:34 ` Paul E. McKenney [this message]
2024-08-02  0:34 ` [PATCH rcu 4/6] rcu/tasks: Mark callbacks not currently participating in barrier operation Paul E. McKenney
2024-08-02  0:34 ` [PATCH rcu 5/6] rcu/tasks: Add detailed grace-period and barrier diagnostics Paul E. McKenney
2024-08-02  0:34 ` [PATCH rcu 6/6] rcu/tasks: Add rcu_barrier_tasks*() start time to diagnostics Paul E. McKenney

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=20240802003426.4134196-3-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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