From: "Paul E. McKenney" <paulmck@kernel.org>
To: frederic@kernel.org, rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
Subject: [PATCH rcu 3/7] rcu: Allow short-circuiting of synchronize_rcu_tasks_rude()
Date: Wed, 9 Oct 2024 11:00:41 -0700 [thread overview]
Message-ID: <20241009180045.777721-3-paulmck@kernel.org> (raw)
In-Reply-To: <2dc6de07-374d-44da-82e9-fa9d9c516b46@paulmck-laptop>
There are now architectures for which all deep-idle and entry-exit
functions are properly inlined or marked noinstr. Such architectures do
not need synchronize_rcu_tasks_rude(), or will not once RCU Tasks has
been modified to pay attention to idle tasks. This commit therefore
allows a CONFIG_ARCH_HAS_NOINSTR_MARKINGS Kconfig option to turn
synchronize_rcu_tasks_rude() into a no-op.
To facilitate testing, kernels built by rcutorture scripting will enable
RCU Tasks Trace even on systems that do not need it.
[ paulmck: Apply Peter Zijlstra feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
---
kernel/rcu/tasks.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 6333f4ccf024b..dd9730fd44fbe 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -1398,7 +1398,8 @@ static void call_rcu_tasks_rude(struct rcu_head *rhp, rcu_callback_t func)
*/
void synchronize_rcu_tasks_rude(void)
{
- synchronize_rcu_tasks_generic(&rcu_tasks_rude);
+ if (!IS_ENABLED(CONFIG_ARCH_WANTS_NO_INSTR) || IS_ENABLED(CONFIG_FORCE_TASKS_RUDE_RCU))
+ synchronize_rcu_tasks_generic(&rcu_tasks_rude);
}
EXPORT_SYMBOL_GPL(synchronize_rcu_tasks_rude);
--
2.40.1
next prev parent reply other threads:[~2024-10-09 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 18:00 [PATCH rcu 0/7] Miscellaneous changes for v6.13 Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 1/7] rcu: Add rcuog kthreads to RCU_NOCB_CPU help text Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 2/7] doc: Add rcuog kthreads to kernel-per-CPU-kthreads.rst Paul E. McKenney
2024-10-09 18:00 ` Paul E. McKenney [this message]
2024-10-09 18:00 ` [PATCH rcu 4/7] rcu: Permit start_poll_synchronize_rcu*() with interrupts disabled Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 5/7] rcutorture: Test start-poll primitives " Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 6/7] doc: Remove kernel-parameters.txt entry for rcutorture.read_exit Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 7/7] rcu-tasks: Remove open-coded one-byte cmpxchg() emulation 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=20241009180045.777721-3-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=frederic@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@kernel.org \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.