RCU Archive mirror
 help / color / mirror / Atom feed
From: Joel Fernandes <joel@joelfernandes.org>
To: "Neeraj Upadhyay (AMD)" <neeraj.iitr10@gmail.com>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, rostedt@goodmis.org, paulmck@kernel.org,
	Neeraj.Upadhyay@amd.com,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH rcu 3/5] doc: Clarify RCU Tasks reader/updater checklist
Date: Tue, 12 Dec 2023 15:09:28 -0500	[thread overview]
Message-ID: <019C4075-EDA3-48A9-8762-CBB28D0BA37C@joelfernandes.org> (raw)
In-Reply-To: <20231212172653.11485-3-neeraj.iitr10@gmail.com>



> On Dec 12, 2023, at 12:27 PM, Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com> wrote:
> 
> From: "Paul E. McKenney" <paulmck@kernel.org>
> 
> Currently, the reader/updater compatibility rules for the three RCU
> Tasks flavors are squished together in a single paragraph, which can
> result in confusion.  This commit therefore splits them out into a list,
> clearly showing the distinction between these flavors.
> 
> Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/
> 
> Reported-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
> ---
> Documentation/RCU/checklist.rst | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst
> index bd3c58c44bef..c432899aff22 100644
> --- a/Documentation/RCU/checklist.rst
> +++ b/Documentation/RCU/checklist.rst
> @@ -241,15 +241,22 @@ over a rather long period of time, but improvements are always welcome!
>    srcu_struct.  The rules for the expedited RCU grace-period-wait
>    primitives are the same as for their non-expedited counterparts.
> 
> -    If the updater uses call_rcu_tasks() or synchronize_rcu_tasks(),
> -    then the readers must refrain from executing voluntary
> -    context switches, that is, from blocking.  If the updater uses
> -    call_rcu_tasks_trace() or synchronize_rcu_tasks_trace(), then
> -    the corresponding readers must use rcu_read_lock_trace() and
> -    rcu_read_unlock_trace().  If an updater uses call_rcu_tasks_rude()
> -    or synchronize_rcu_tasks_rude(), then the corresponding readers
> -    must use anything that disables preemption, for example,
> -    preempt_disable() and preempt_enable().
> +    Similarly, it is necssary to correctly use the RCU Tasks flavors:

Typo: necessary.

Probably no need to resend this one, just fix in the PR.

Thanks,

 - Joel




> +
> +    a.    If the updater uses synchronize_rcu_tasks() or
> +        call_rcu_tasks(), then the readers must refrain from
> +        executing voluntary context switches, that is, from
> +        blocking.
> +
> +    b.    If the updater uses call_rcu_tasks_trace()
> +        or synchronize_rcu_tasks_trace(), then the
> +        corresponding readers must use rcu_read_lock_trace()
> +        and rcu_read_unlock_trace().
> +
> +    c.    If an updater uses call_rcu_tasks_rude() or
> +        synchronize_rcu_tasks_rude(), then the corresponding
> +        readers must use anything that disables preemption,
> +        for example, preempt_disable() and preempt_enable().
> 
>    Mixing things up will result in confusion and broken kernels, and
>    has even resulted in an exploitable security issue.  Therefore,
> -- 
> 2.40.1
> 
> 

  reply	other threads:[~2023-12-12 20:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 17:23 [PATCH rcu 0/5] Documentation updates for v6.8 Neeraj Upadhyay (AMD)
2023-12-12 17:26 ` [PATCH rcu 1/5] Documentation: RCU: Remove repeated word in comments Neeraj Upadhyay (AMD)
2023-12-12 17:26 ` [PATCH rcu 2/5] rculist.h: docs: Fix wrong function summary Neeraj Upadhyay (AMD)
2023-12-12 17:26 ` [PATCH rcu 3/5] doc: Clarify RCU Tasks reader/updater checklist Neeraj Upadhyay (AMD)
2023-12-12 20:09   ` Joel Fernandes [this message]
2023-12-12 17:26 ` [PATCH rcu 4/5] doc: Mention address and data dependencies in rcu_dereference.rst Neeraj Upadhyay (AMD)
2023-12-12 17:26 ` [PATCH rcu 5/5] doc: Clarify historical disclaimers in memory-barriers.txt Neeraj Upadhyay (AMD)

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=019C4075-EDA3-48A9-8762-CBB28D0BA37C@joelfernandes.org \
    --to=joel@joelfernandes.org \
    --cc=Neeraj.Upadhyay@amd.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraj.iitr10@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).