From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
To: linux-kernel@vger.kernel.org
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
rcu@vger.kernel.org, kernel-team@android.com,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kselftest@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Shuah Khan <shuah@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [RFC 2/3] rcu: Simplify rcu_note_context_switch exit from critical section
Date: Mon, 1 Jul 2019 00:04:14 -0400 [thread overview]
Message-ID: <20190701040415.219001-2-joel@joelfernandes.org> (raw)
In-Reply-To: <20190701040415.219001-1-joel@joelfernandes.org>
The rcu_preempt_note_context_switch() tries to handle cases where
__rcu_read_unlock() got preempted and then the context switch path does
the reporting of the quiscent state along with clearing any bits in the
rcu_read_unlock_special union.
This can be handled by just calling rcu_deferred_qs() which was added
during the RCU consolidation work and already does these checks.
Tested RCU config TREE03 for an hour which succeeds.
Cc: rcu@vger.kernel.org
Cc: kernel-team@android.com
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
kernel/rcu/tree_plugin.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index bff6410fac06..ebb4d46a6267 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -313,15 +313,6 @@ void rcu_note_context_switch(bool preempt)
? rnp->gp_seq
: rcu_seq_snap(&rnp->gp_seq));
rcu_preempt_ctxt_queue(rnp, rdp);
- } else if (t->rcu_read_lock_nesting < 0 &&
- t->rcu_read_unlock_special.s) {
-
- /*
- * Complete exit from RCU read-side critical section on
- * behalf of preempted instance of __rcu_read_unlock().
- */
- rcu_read_unlock_special(t);
- rcu_preempt_deferred_qs(t);
} else {
rcu_preempt_deferred_qs(t);
}
--
2.22.0.410.gd8fdbe21b5-goog
next prev parent reply other threads:[~2019-07-01 4:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 4:04 [RFC 1/3] rcu: Expedite the rcu quiescent state reporting if help needed Joel Fernandes (Google)
2019-07-01 4:04 ` Joel Fernandes (Google) [this message]
2019-07-01 20:03 ` [RFC 2/3] rcu: Simplify rcu_note_context_switch exit from critical section 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 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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox