From: "Paul E. McKenney" <paulmck@kernel.org>
To: zhouzhouyi@gmail.com
Cc: josh@joshtriplett.org, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
joel@joelfernandes.org, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RCU: Fix macro name CONFIG_TASKS_RCU_TRACE
Date: Mon, 12 Jul 2021 21:16:07 -0700 [thread overview]
Message-ID: <20210713041607.GU4397@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <20210713005645.8565-1-zhouzhouyi@gmail.com>
On Tue, Jul 13, 2021 at 08:56:45AM +0800, zhouzhouyi@gmail.com wrote:
> From: Zhouyi Zhou <zhouzhouyi@gmail.com>
>
> Hi Paul,
>
> During my studying of RCU, I did a grep in the kernel source tree.
> I found there are 3 places where the macro name CONFIG_TASKS_RCU_TRACE
> should be CONFIG_TASKS_TRACE_RCU instead.
>
> Without memory fencing, the idle/userspace task inspection may not
> be so accurate.
>
> Thanks for your constant encouragement for my studying.
>
> Best Wishes
> Zhouyi
>
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Good eyes, and those could cause real bugs, so thank you!
Could you please check the wordsmithed version below?
Thanx, Paul
------------------------------------------------------------------------
commit fdcf5524b64f2cc8e6201447644079d9f8d4c821
Author: Zhouyi Zhou <zhouzhouyi@gmail.com>
Date: Tue Jul 13 08:56:45 2021 +0800
RCU: Fix macro name CONFIG_TASKS_RCU_TRACE
This commit fixes several typos where CONFIG_TASKS_RCU_TRACE should
instead be CONFIG_TASKS_TRACE_RCU. Among other things, these typos
could cause CONFIG_TASKS_TRACE_RCU_READ_MB=y kernels to suffer from
memory-ordering bugs that could result in false-positive quiescent
states and too-short grace periods.
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index cfeb43bfc719..434d12fe2d4f 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -167,7 +167,7 @@ void synchronize_rcu_tasks(void);
# define synchronize_rcu_tasks synchronize_rcu
# endif
-# ifdef CONFIG_TASKS_RCU_TRACE
+# ifdef CONFIG_TASKS_TRACE_RCU
# define rcu_tasks_trace_qs(t) \
do { \
if (!likely(READ_ONCE((t)->trc_reader_checked)) && \
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 27b74352cccf..a8e3acead6f6 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1498,17 +1498,17 @@ static void noinstr rcu_dynticks_task_exit(void)
/* Turn on heavyweight RCU tasks trace readers on idle/user entry. */
static void rcu_dynticks_task_trace_enter(void)
{
-#ifdef CONFIG_TASKS_RCU_TRACE
+#ifdef CONFIG_TASKS_TRACE_RCU
if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))
current->trc_reader_special.b.need_mb = true;
-#endif /* #ifdef CONFIG_TASKS_RCU_TRACE */
+#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
}
/* Turn off heavyweight RCU tasks trace readers on idle/user exit. */
static void rcu_dynticks_task_trace_exit(void)
{
-#ifdef CONFIG_TASKS_RCU_TRACE
+#ifdef CONFIG_TASKS_TRACE_RCU
if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))
current->trc_reader_special.b.need_mb = false;
-#endif /* #ifdef CONFIG_TASKS_RCU_TRACE */
+#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
}
next prev parent reply other threads:[~2021-07-13 4:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 0:56 zhouzhouyi
2021-07-13 4:16 ` Paul E. McKenney [this message]
2021-07-13 6:16 ` Zhouyi Zhou
2021-07-13 13:09 ` Mathieu Desnoyers
2021-07-13 13:18 ` Paul E. McKenney
2021-07-13 15:19 ` Paul E. McKenney
2021-07-14 4:44 ` Zhouyi Zhou
2021-07-15 3:51 ` Paul E. McKenney
2021-07-15 8:45 ` Zhouyi Zhou
2021-07-15 18:09 ` Paul E. McKenney
2021-07-17 22:03 ` Zhouyi Zhou
2021-07-18 21:08 ` Paul E. McKenney
2021-07-20 1:39 ` Randy Dunlap
2021-07-20 2:07 ` 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=20210713041607.GU4397@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=zhouzhouyi@gmail.com \
/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
all inboxes | Powered by JetHome®