* [PATCH] rcu: Improve tree_plugin.h comments and add code cleanups
@ 2021-10-24 0:36 Zhouyi Zhou
2021-10-25 3:30 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Zhouyi Zhou @ 2021-10-24 0:36 UTC (permalink / raw)
To: paulmck, josh, rostedt, mathieu.desnoyers, jiangshanlai, joel, rcu
Cc: Zhouyi Zhou
This commit cleans up some comments and code in kernel/rcu/tree_plugin.h.
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
Hi Paul,
I perform some comments and code cleans up in kernel/rcu/tree_plugin.h
while learning RCU.
Thanks
Zhouyi
--
kernel/rcu/tree_plugin.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index d070059163d7..dde7fa17ae2b 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -16,7 +16,7 @@
static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
{
/*
- * In order to read the offloaded state of an rdp is a safe
+ * In order to read the offloaded state of an rdp in a safe
* and stable way and prevent from its value to be changed
* under us, we must either hold the barrier mutex, the cpu
* hotplug lock (read or write) or the nocb lock. Local
@@ -56,7 +56,7 @@ static void __init rcu_bootup_announce_oddness(void)
if (IS_ENABLED(CONFIG_PROVE_RCU))
pr_info("\tRCU lockdep checking is enabled.\n");
if (IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD))
- pr_info("\tRCU strict (and thus non-scalable) grace periods enabled.\n");
+ pr_info("\tRCU strict (and thus non-scalable) grace periods are enabled.\n");
if (RCU_NUM_LVLS >= 4)
pr_info("\tFour(or more)-level hierarchy is enabled.\n");
if (RCU_FANOUT_LEAF != 16)
@@ -88,13 +88,13 @@ static void __init rcu_bootup_announce_oddness(void)
if (rcu_kick_kthreads)
pr_info("\tKick kthreads if too-long grace period.\n");
if (IS_ENABLED(CONFIG_DEBUG_OBJECTS_RCU_HEAD))
- pr_info("\tRCU callback double-/use-after-free debug enabled.\n");
+ pr_info("\tRCU callback double-/use-after-free debug is enabled.\n");
if (gp_preinit_delay)
pr_info("\tRCU debug GP pre-init slowdown %d jiffies.\n", gp_preinit_delay);
if (gp_init_delay)
pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_init_delay);
if (gp_cleanup_delay)
- pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_cleanup_delay);
+ pr_info("\tRCU debug GP cleanup slowdown %d jiffies.\n", gp_cleanup_delay);
if (!use_softirq)
pr_info("\tRCU_SOFTIRQ processing moved to rcuc kthreads.\n");
if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG))
@@ -1154,7 +1154,6 @@ static void rcu_preempt_boost_start_gp(struct rcu_node *rnp)
/*
* Create an RCU-boost kthread for the specified node if one does not
* already exist. We only create this kthread for preemptible RCU.
- * Returns zero if all is well, a negated errno otherwise.
*/
static void rcu_spawn_one_boost_kthread(struct rcu_node *rnp)
{
@@ -1456,7 +1455,7 @@ static void rcu_cleanup_after_idle(void)
* CPU unless the grace period has extended for too long.
*
* This code relies on the fact that all NO_HZ_FULL CPUs are also
- * CONFIG_RCU_NOCB_CPU CPUs.
+ * RCU_NOCB_CPU CPUs.
*/
static bool rcu_nohz_full_cpu(void)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rcu: Improve tree_plugin.h comments and add code cleanups
2021-10-24 0:36 [PATCH] rcu: Improve tree_plugin.h comments and add code cleanups Zhouyi Zhou
@ 2021-10-25 3:30 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2021-10-25 3:30 UTC (permalink / raw)
To: Zhouyi Zhou; +Cc: josh, rostedt, mathieu.desnoyers, jiangshanlai, joel, rcu
On Sun, Oct 24, 2021 at 08:36:34AM +0800, Zhouyi Zhou wrote:
> This commit cleans up some comments and code in kernel/rcu/tree_plugin.h.
>
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
> ---
> Hi Paul,
>
> I perform some comments and code cleans up in kernel/rcu/tree_plugin.h
> while learning RCU.
Good eyes, queued and pushed, thank you!
A couple of comments below.
Thanx, Paul
> Thanks
> Zhouyi
> --
> kernel/rcu/tree_plugin.h | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index d070059163d7..dde7fa17ae2b 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -16,7 +16,7 @@
> static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
> {
> /*
> - * In order to read the offloaded state of an rdp is a safe
> + * In order to read the offloaded state of an rdp in a safe
> * and stable way and prevent from its value to be changed
> * under us, we must either hold the barrier mutex, the cpu
> * hotplug lock (read or write) or the nocb lock. Local
> @@ -56,7 +56,7 @@ static void __init rcu_bootup_announce_oddness(void)
> if (IS_ENABLED(CONFIG_PROVE_RCU))
> pr_info("\tRCU lockdep checking is enabled.\n");
> if (IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD))
> - pr_info("\tRCU strict (and thus non-scalable) grace periods enabled.\n");
> + pr_info("\tRCU strict (and thus non-scalable) grace periods are enabled.\n");
Although the original is a correct abbreviation by common usage (witness
"Hyperdrive module enabled!" in some science fiction movies or similar),
it certainly does not hurt to move towards standard usage. So I took
this change.
> if (RCU_NUM_LVLS >= 4)
> pr_info("\tFour(or more)-level hierarchy is enabled.\n");
> if (RCU_FANOUT_LEAF != 16)
> @@ -88,13 +88,13 @@ static void __init rcu_bootup_announce_oddness(void)
> if (rcu_kick_kthreads)
> pr_info("\tKick kthreads if too-long grace period.\n");
> if (IS_ENABLED(CONFIG_DEBUG_OBJECTS_RCU_HEAD))
> - pr_info("\tRCU callback double-/use-after-free debug enabled.\n");
> + pr_info("\tRCU callback double-/use-after-free debug is enabled.\n");
And same here.
> if (gp_preinit_delay)
> pr_info("\tRCU debug GP pre-init slowdown %d jiffies.\n", gp_preinit_delay);
> if (gp_init_delay)
> pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_init_delay);
> if (gp_cleanup_delay)
> - pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_cleanup_delay);
> + pr_info("\tRCU debug GP cleanup slowdown %d jiffies.\n", gp_cleanup_delay);
> if (!use_softirq)
> pr_info("\tRCU_SOFTIRQ processing moved to rcuc kthreads.\n");
> if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG))
> @@ -1154,7 +1154,6 @@ static void rcu_preempt_boost_start_gp(struct rcu_node *rnp)
> /*
> * Create an RCU-boost kthread for the specified node if one does not
> * already exist. We only create this kthread for preemptible RCU.
> - * Returns zero if all is well, a negated errno otherwise.
> */
> static void rcu_spawn_one_boost_kthread(struct rcu_node *rnp)
> {
> @@ -1456,7 +1455,7 @@ static void rcu_cleanup_after_idle(void)
> * CPU unless the grace period has extended for too long.
> *
> * This code relies on the fact that all NO_HZ_FULL CPUs are also
> - * CONFIG_RCU_NOCB_CPU CPUs.
> + * RCU_NOCB_CPU CPUs.
> */
> static bool rcu_nohz_full_cpu(void)
> {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-25 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 0:36 [PATCH] rcu: Improve tree_plugin.h comments and add code cleanups Zhouyi Zhou
2021-10-25 3:30 ` Paul E. McKenney
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.