Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: Li-Kuan Ou <k777k777tw@gmail.com>, lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] [PATCH] Fix: revise urcu_read_lock_update() comment
Date: Thu, 15 Jun 2023 16:26:21 -0400	[thread overview]
Message-ID: <55e5ace4-7e85-3f54-c7b8-23d157b556f2@efficios.com> (raw)
In-Reply-To: <20230614015148.12974-1-k777k777tw@gmail.com>

On 6/13/23 21:51, Li-Kuan Ou wrote:
> Read-side critical section nesting is tracked in lower-order bits
> and grace-period phase number use a single high-order bit
> 

Merged, thanks!

Mathieu

> Signed-off-by: Li-Kuan Ou <k777k777tw@gmail.com>
> ---
>   include/urcu/static/urcu-bp.h     | 6 +++---
>   include/urcu/static/urcu-mb.h     | 6 +++---
>   include/urcu/static/urcu-memb.h   | 6 +++---
>   include/urcu/static/urcu-signal.h | 6 +++---
>   4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/include/urcu/static/urcu-bp.h b/include/urcu/static/urcu-bp.h
> index 8ba3830..b163a90 100644
> --- a/include/urcu/static/urcu-bp.h
> +++ b/include/urcu/static/urcu-bp.h
> @@ -137,9 +137,9 @@ static inline enum urcu_bp_state urcu_bp_reader_state(unsigned long *ctr)
>   
>   /*
>    * Helper for _urcu_bp_read_lock().  The format of urcu_bp_gp.ctr (as well as
> - * the per-thread rcu_reader.ctr) has the upper bits containing a count of
> - * _urcu_bp_read_lock() nesting, and a lower-order bit that contains either zero
> - * or URCU_BP_GP_CTR_PHASE.  The smp_mb_slave() ensures that the accesses in
> + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of
> + * _urcu_bp_read_lock() nesting, and a single high-order URCU_BP_GP_CTR_PHASE bit
> + * that contains either zero or one.  The smp_mb_slave() ensures that the accesses in
>    * _urcu_bp_read_lock() happen before the subsequent read-side critical section.
>    */
>   static inline void _urcu_bp_read_lock_update(unsigned long tmp)
> diff --git a/include/urcu/static/urcu-mb.h b/include/urcu/static/urcu-mb.h
> index b97e42a..253d29b 100644
> --- a/include/urcu/static/urcu-mb.h
> +++ b/include/urcu/static/urcu-mb.h
> @@ -63,9 +63,9 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_mb_reader);
>   
>   /*
>    * Helper for _urcu_mb_read_lock().  The format of urcu_mb_gp.ctr (as well as
> - * the per-thread rcu_reader.ctr) has the upper bits containing a count of
> - * _urcu_mb_read_lock() nesting, and a lower-order bit that contains either zero
> - * or URCU_GP_CTR_PHASE.  The cmm_smp_mb() ensures that the accesses in
> + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of
> + * _urcu_mb_read_lock() nesting, and a single high-order URCU_BP_GP_CTR_PHASE bit
> + * that contains either zero or one.  The cmm_smp_mb() ensures that the accesses in
>    * _urcu_mb_read_lock() happen before the subsequent read-side critical section.
>    */
>   static inline void _urcu_mb_read_lock_update(unsigned long tmp)
> diff --git a/include/urcu/static/urcu-memb.h b/include/urcu/static/urcu-memb.h
> index c8d102f..f64cb57 100644
> --- a/include/urcu/static/urcu-memb.h
> +++ b/include/urcu/static/urcu-memb.h
> @@ -86,9 +86,9 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_memb_reader);
>   
>   /*
>    * Helper for _rcu_read_lock().  The format of urcu_memb_gp.ctr (as well as
> - * the per-thread rcu_reader.ctr) has the upper bits containing a count of
> - * _rcu_read_lock() nesting, and a lower-order bit that contains either zero
> - * or URCU_GP_CTR_PHASE.  The smp_mb_slave() ensures that the accesses in
> + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of
> + * _rcu_read_lock() nesting, and a single high-order URCU_BP_GP_CTR_PHASE bit
> + * that contains either zero or one.  The smp_mb_slave() ensures that the accesses in
>    * _rcu_read_lock() happen before the subsequent read-side critical section.
>    */
>   static inline void _urcu_memb_read_lock_update(unsigned long tmp)
> diff --git a/include/urcu/static/urcu-signal.h b/include/urcu/static/urcu-signal.h
> index c7577d3..707eaf8 100644
> --- a/include/urcu/static/urcu-signal.h
> +++ b/include/urcu/static/urcu-signal.h
> @@ -64,9 +64,9 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_signal_reader);
>   
>   /*
>    * Helper for _rcu_read_lock().  The format of urcu_signal_gp.ctr (as well as
> - * the per-thread rcu_reader.ctr) has the upper bits containing a count of
> - * _rcu_read_lock() nesting, and a lower-order bit that contains either zero
> - * or URCU_GP_CTR_PHASE.  The cmm_barrier() ensures that the accesses in
> + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of
> + * _rcu_read_lock() nesting, and a single high-order URCU_BP_GP_CTR_PHASE bit
> + * that contains either zero or one.  The cmm_barrier() ensures that the accesses in
>    * _rcu_read_lock() happen before the subsequent read-side critical section.
>    */
>   static inline void _urcu_signal_read_lock_update(unsigned long tmp)

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

      reply	other threads:[~2023-06-15 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 15:45 Li-Kuan Ou via lttng-dev
2023-06-13 20:16 ` Mathieu Desnoyers via lttng-dev
2023-06-14  1:51   ` Li-Kuan Ou via lttng-dev
2023-06-15 20:26     ` Mathieu Desnoyers via lttng-dev [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=55e5ace4-7e85-3f54-c7b8-23d157b556f2@efficios.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=k777k777tw@gmail.com \
    --cc=mathieu.desnoyers@efficios.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