The Linux Kernel Mailing List
 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 v2 1/5] rcu: Document that rcu_barrier() hurries lazy callbacks
Date: Thu, 18 Sep 2025 03:17:48 -0700	[thread overview]
Message-ID: <20250918101752.2592512-1-paulmck@kernel.org> (raw)
In-Reply-To: <3773a6e3-8ec8-48c5-9277-264cd8ccbb10@paulmck-laptop>

This commit adds to the rcu_barrier() kerneldoc header stating that this
function hurries lazy callbacks and that it does not normally result in
additional RCU grace periods.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/tree.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 8eff357b0436be..1291e0761d70ab 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3800,6 +3800,11 @@ static void rcu_barrier_handler(void *cpu_in)
  * to complete.  For example, if there are no RCU callbacks queued anywhere
  * in the system, then rcu_barrier() is within its rights to return
  * immediately, without waiting for anything, much less an RCU grace period.
+ * In fact, rcu_barrier() will normally not result in any RCU grace periods
+ * beyond those that were already destined to be executed.
+ *
+ * In kernels built with CONFIG_RCU_LAZY=y, this function also hurries all
+ * pending lazy RCU callbacks.
  */
 void rcu_barrier(void)
 {
-- 
2.40.1


  reply	other threads:[~2025-09-18 10:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-16  0:01 [PATCH 0/3] Miscellaneous RCU updates for v6.18 Paul E. McKenney
2025-08-16  0:01 ` [PATCH 1/3] rcu: Document that rcu_barrier() hurries lazy callbacks Paul E. McKenney
2025-08-16  0:01 ` [PATCH 2/3] rcu: Remove local_irq_save/restore() in rcu_preempt_deferred_qs_handler() Paul E. McKenney
2025-08-16  0:01 ` [PATCH 3/3] rculist: move list_for_each_rcu() to where it belongs Paul E. McKenney
2025-09-18 10:17 ` [PATCH v2 0/5] Miscellaneous RCU updates for v6.18 Paul E. McKenney
2025-09-18 10:17   ` Paul E. McKenney [this message]
2025-09-18 10:17   ` [PATCH v2 2/5] rcu: Remove local_irq_save/restore() in rcu_preempt_deferred_qs_handler() Paul E. McKenney
2025-09-18 10:17   ` [PATCH v2 3/5] rculist: move list_for_each_rcu() to where it belongs Paul E. McKenney
2025-09-18 10:17   ` [PATCH v2 4/5] rcu: replace use of system_wq with system_percpu_wq Paul E. McKenney
2025-09-18 10:17   ` [PATCH v2 5/5] rcu: WQ_PERCPU added to alloc_workqueue users Paul E. McKenney
2025-09-19 13:32     ` Frederic Weisbecker

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=20250918101752.2592512-1-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