All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
To: linux-kernel@vger.kernel.org
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	kernel-team@android.com, Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kselftest@vger.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"Paul E. McKenney" <paulmck@linux.ibm.com>,
	rcu@vger.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Shuah Khan <shuah@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [RFC 1/3] rcu: Expedite the rcu quiescent state reporting if help needed
Date: Mon,  1 Jul 2019 00:04:13 -0400	[thread overview]
Message-ID: <20190701040415.219001-1-joel@joelfernandes.org> (raw)

The t->rcu_read_unlock_special union's need_qs bit can be set by the
scheduler tick (in rcu_flavor_sched_clock_irq) to indicate that help is
needed from the rcu_read_unlock path. When this help arrives however, we
can do better to speed up the quiescent state reporting which if
rcu_read_unlock_special::need_qs is set might be quite urgent. Make use
of this information in deciding when to do heavy-weight softirq raising
where possible.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 kernel/rcu/tree_plugin.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index c588ef98efd3..bff6410fac06 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -622,7 +622,8 @@ static void rcu_read_unlock_special(struct task_struct *t)
 		t->rcu_read_unlock_special.b.exp_hint = false;
 		exp = (t->rcu_blocked_node && t->rcu_blocked_node->exp_tasks) ||
 		      (rdp->grpmask & rnp->expmask) ||
-		      tick_nohz_full_cpu(rdp->cpu);
+		      tick_nohz_full_cpu(rdp->cpu)  ||
+		      t->rcu_read_unlock_special.b.need_qs;
 		// Need to defer quiescent state until everything is enabled.
 		if (irqs_were_disabled && use_softirq &&
 		    (in_interrupt() ||
-- 
2.22.0.410.gd8fdbe21b5-goog


             reply	other threads:[~2019-07-01  4:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  4:04 Joel Fernandes (Google) [this message]
2019-07-01  4:04 ` [RFC 2/3] rcu: Simplify rcu_note_context_switch exit from critical section Joel Fernandes (Google)
2019-07-01 20:03   ` Paul E. McKenney
2019-07-01 21:33     ` Joel Fernandes
2019-07-01 21:42       ` Paul E. McKenney
2019-07-01  4:04 ` [RFC 3/3] Revert "rcutorture: Tweak kvm options" Joel Fernandes (Google)
2019-07-01 12:23   ` Sebastian Andrzej Siewior
2019-07-01 14:14     ` Joel Fernandes
2019-07-01 14:48       ` Dmitry Vyukov
2019-07-01 14:59         ` Joel Fernandes
2019-07-01 20:27           ` Paul E. McKenney
2019-07-01 21:31             ` Joel Fernandes
2019-07-01 21:50               ` Paul E. McKenney
2019-07-02  2:56                 ` Joel Fernandes
2019-07-02  3:34                   ` Paul E. McKenney
2020-07-31  9:22       ` [tip: core/rcu] torture: Remove qemu dependency on EFI firmware tip-bot2 for Paul E. McKenney
2019-07-01 13:53 ` [RFC 1/3] rcu: Expedite the rcu quiescent state reporting if help needed Joel Fernandes
2019-07-02  3:47 ` Paul E. McKenney
2019-07-02 11:40   ` Joel Fernandes

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=20190701040415.219001-1-joel@joelfernandes.org \
    --to=joel@joelfernandes.org \
    --cc=bigeasy@linutronix.de \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.ibm.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.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.