From: Uladzislau Rezki <urezki@gmail.com>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org, bigeasy@linutronix.de,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
rcu@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
urezki@gmail.com
Subject: Re: [PATCH rcu/dev -fixes 4/4] rcu/tree: Use consistent style for comments
Date: Tue, 21 Apr 2020 15:08:51 +0200 [thread overview]
Message-ID: <20200421130851.GA5695@pc636> (raw)
In-Reply-To: <20200420153837.194532-5-joel@joelfernandes.org>
On Mon, Apr 20, 2020 at 11:38:37AM -0400, Joel Fernandes (Google) wrote:
> Simple clean up of comments in kfree_rcu() code to keep it consistent
> with majority of commenting styles.
>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> ---
> kernel/rcu/tree.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index f6eb3aee0935e..0512e0f9e2f31 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3043,15 +3043,15 @@ static inline bool queue_kfree_rcu_work(struct kfree_rcu_cpu *krcp)
> static inline void kfree_rcu_drain_unlock(struct kfree_rcu_cpu *krcp,
> unsigned long flags)
> {
> - // Attempt to start a new batch.
> + /* Attempt to start a new batch. */
> krcp->monitor_todo = false;
> if (queue_kfree_rcu_work(krcp)) {
> - // Success! Our job is done here.
> + /* Success! Our job is done here. */
> raw_spin_unlock_irqrestore(&krcp->lock, flags);
> return;
> }
>
> - // Previous RCU batch still in progress, try again later.
> + /* Previous RCU batch still in progress, try again later. */
> krcp->monitor_todo = true;
> schedule_delayed_work(&krcp->monitor_work, KFREE_DRAIN_JIFFIES);
> raw_spin_unlock_irqrestore(&krcp->lock, flags);
> @@ -3152,14 +3152,14 @@ void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func)
> unsigned long flags;
> struct kfree_rcu_cpu *krcp;
>
> - local_irq_save(flags); // For safely calling this_cpu_ptr().
> + local_irq_save(flags); /* For safely calling this_cpu_ptr(). */
> krcp = this_cpu_ptr(&krc);
> if (krcp->initialized)
> raw_spin_lock(&krcp->lock);
>
> - // Queue the object but don't yet schedule the batch.
> + /* Queue the object but don't yet schedule the batch. */
> if (debug_rcu_head_queue(head)) {
> - // Probable double kfree_rcu(), just leak.
> + /* Probable double kfree_rcu(), just leak. */
> WARN_ONCE(1, "%s(): Double-freed call. rcu_head %p\n",
> __func__, head);
> goto unlock_return;
> @@ -3177,7 +3177,7 @@ void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func)
>
> WRITE_ONCE(krcp->count, krcp->count + 1);
>
> - // Set timer to drain after KFREE_DRAIN_JIFFIES.
> + /* Set timer to drain after KFREE_DRAIN_JIFFIES. */
> if (rcu_scheduler_active == RCU_SCHEDULER_RUNNING &&
> !krcp->monitor_todo) {
> krcp->monitor_todo = true;
> @@ -3723,7 +3723,7 @@ int rcutree_offline_cpu(unsigned int cpu)
>
> rcutree_affinity_setting(cpu, cpu);
>
> - // nohz_full CPUs need the tick for stop-machine to work quickly
> + /* nohz_full CPUs need the tick for stop-machine to work quickly */
> tick_dep_set(TICK_DEP_BIT_RCU);
> return 0;
> }
> --
> 2.26.1.301.g55bc3eb7cb9-goog
>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
--
Vlad Rezki
prev parent reply other threads:[~2020-04-21 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 15:38 [PATCH rcu/dev -fixes 0/4] Joel Fernandes (Google)
2020-04-20 15:38 ` [PATCH rcu/dev -fixes 1/4] rcu/tree: Keep kfree_rcu() awake during lock contention Joel Fernandes (Google)
2020-04-21 13:12 ` Uladzislau Rezki
2020-04-20 15:38 ` [PATCH rcu/dev -fixes 2/4] rcu/tree: Skip entry into the page allocator for PREEMPT_RT Joel Fernandes (Google)
2020-04-22 10:35 ` Uladzislau Rezki
2020-04-22 11:45 ` Uladzislau Rezki
2020-04-22 13:18 ` joel
2020-04-22 13:28 ` Paul E. McKenney
2020-04-20 15:38 ` [PATCH rcu/dev -fixes 3/4] rcu/tree: Avoid using xchg() in kfree_call_rcu_add_ptr_to_bulk() Joel Fernandes (Google)
2020-04-20 17:18 ` Uladzislau Rezki
2020-04-20 18:19 ` Joel Fernandes
2020-04-20 15:38 ` [PATCH rcu/dev -fixes 4/4] rcu/tree: Use consistent style for comments Joel Fernandes (Google)
2020-04-21 13:08 ` Uladzislau Rezki [this message]
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=20200421130851.GA5695@pc636 \
--to=urezki@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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.