All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: rcu@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Scott Wood <swood@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 2/5] rcu: Use rcuc threads on PREEMPT_RT.
Date: Tue, 15 Dec 2020 15:16:46 +0100	[thread overview]
Message-ID: <20201215141649.796472-3-bigeasy@linutronix.de> (raw)
In-Reply-To: <20201215141649.796472-1-bigeasy@linutronix.de>

From: Scott Wood <swood@redhat.com>

Using rcuc threads for processing callbacks over softirq has the
advantage that the callbacks can be processed independently. On
PREEMPT_RT the softirq can be preempted. Relying on softirq for callback
processing would mean to complete the current stage of softirq for the
sake of running callbacks. The softirq is processed on PREEMPT_RT in the
context of the task that is raising a softirq. If it is raised in-IRQ
context then the softirq processing is deferred to the `ksoftirqd'
thread.
Processing RCU callbacks in thread context was always the only option
for PREEMPT_RT and there have been no complains.

Disable softirq usage for RCU and disable its commandline parameter.

Signed-off-by: Scott Wood <swood@redhat.com>
[bigeasy: Reword commit message]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/rcu/tree.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 80ceee55f379a..57eff3b82104c 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -100,8 +100,10 @@ static struct rcu_state rcu_state = {
 static bool dump_tree;
 module_param(dump_tree, bool, 0444);
 /* By default, use RCU_SOFTIRQ instead of rcuc kthreads. */
-static bool use_softirq = true;
+static bool use_softirq = !IS_ENABLED(CONFIG_PREEMPT_RT);
+#ifndef CONFIG_PREEMPT_RT
 module_param(use_softirq, bool, 0444);
+#endif
 /* Control rcu_node-tree auto-balancing at boot time. */
 static bool rcu_fanout_exact;
 module_param(rcu_fanout_exact, bool, 0444);
-- 
2.29.2


  parent reply	other threads:[~2020-12-15 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 14:16 [PATCH 0/5] A few smaller RCU related patches from the RT tree Sebastian Andrzej Siewior
2020-12-15 14:16 ` [PATCH 1/5] rcu: make RCU_BOOST default on CONFIG_PREEMPT_RT Sebastian Andrzej Siewior
2020-12-15 14:16 ` Sebastian Andrzej Siewior [this message]
2020-12-15 14:16 ` [PATCH 3/5] rcu: enable rcu_normal_after_boot by default for RT Sebastian Andrzej Siewior
2020-12-15 14:16 ` [PATCH 4/5] doc: Update RCU's requirements page about the PREEMPT_RT wiki Sebastian Andrzej Siewior
2020-12-15 14:16 ` [PATCH 5/5] doc: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
2020-12-15 18:01 ` [PATCH 0/5] A few smaller RCU related patches from the RT tree Paul E. McKenney
2020-12-15 20:47   ` Sebastian Andrzej Siewior

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=20201215141649.796472-3-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=swood@redhat.com \
    --cc=tglx@linutronix.de \
    /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.