LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH RESEND] Documentation: RCU: lockdep.txt: Convert to lockdep.rst
@ 2020-03-03 14:45 Pawan Kumar Meena
2020-03-05 0:10 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Pawan Kumar Meena @ 2020-03-03 14:45 UTC (permalink / raw)
To: paulmck, joel
Cc: linux-doc, linux-kernel, linux-kernel-mentees, Pawan Kumar Meena
This patch converts lockdep.txt to lockdep.rst and adds it to index.rst.
Signed-off-by: Pawan Kumar Meena <pawank1804@gmail.com>
---
Documentation/RCU/index.rst | 1 +
Documentation/RCU/{lockdep.txt => lockdep.rst} | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
rename Documentation/RCU/{lockdep.txt => lockdep.rst} (97%)
diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
index 81a0a1e5f767..109dea13f165 100644
--- a/Documentation/RCU/index.rst
+++ b/Documentation/RCU/index.rst
@@ -10,6 +10,7 @@ RCU concepts
arrayRCU
rcubarrier
rcu_dereference
+ lockdep
whatisRCU
rcu
listRCU
diff --git a/Documentation/RCU/lockdep.txt b/Documentation/RCU/lockdep.rst
similarity index 97%
rename from Documentation/RCU/lockdep.txt
rename to Documentation/RCU/lockdep.rst
index 89db949eeca0..3a88d8a59753 100644
--- a/Documentation/RCU/lockdep.txt
+++ b/Documentation/RCU/lockdep.rst
@@ -1,4 +1,7 @@
+.. _lockdep_doc:
+
RCU and lockdep checking
+========================
All flavors of RCU have lockdep checking available, so that lockdep is
aware of when each task enters and leaves any flavor of RCU read-side
@@ -63,7 +66,7 @@ checking of rcu_dereference() primitives:
The rcu_dereference_check() check expression can be any boolean
expression, but would normally include a lockdep expression. However,
any boolean expression can be used. For a moderately ornate example,
-consider the following:
+consider the following::
file = rcu_dereference_check(fdt->fd[fd],
lockdep_is_held(&files->file_lock) ||
@@ -82,7 +85,7 @@ RCU read-side critical sections, in case (2) the ->file_lock prevents
any change from taking place, and finally, in case (3) the current task
is the only task accessing the file_struct, again preventing any change
from taking place. If the above statement was invoked only from updater
-code, it could instead be written as follows:
+code, it could instead be written as follows::
file = rcu_dereference_protected(fdt->fd[fd],
lockdep_is_held(&files->file_lock) ||
@@ -105,7 +108,7 @@ false and they are called from outside any RCU read-side critical section.
For example, the workqueue for_each_pwq() macro is intended to be used
either within an RCU read-side critical section or with wq->mutex held.
-It is thus implemented as follows:
+It is thus implemented as follows::
#define for_each_pwq(pwq, wq)
list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node,
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] Documentation: RCU: lockdep.txt: Convert to lockdep.rst
2020-03-03 14:45 [PATCH RESEND] Documentation: RCU: lockdep.txt: Convert to lockdep.rst Pawan Kumar Meena
@ 2020-03-05 0:10 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-03-05 0:10 UTC (permalink / raw)
To: Pawan Kumar Meena; +Cc: joel, linux-doc, linux-kernel, linux-kernel-mentees
On Tue, Mar 03, 2020 at 08:15:46PM +0530, Pawan Kumar Meena wrote:
> This patch converts lockdep.txt to lockdep.rst and adds it to index.rst.
>
> Signed-off-by: Pawan Kumar Meena <pawank1804@gmail.com>
Given an ack from someone on the docs side, I will be happy to queue
this one. Given the large change from the last posted version with no
version history, I am a bit leery of taking it straight away.
Thanx, Paul
> ---
> Documentation/RCU/index.rst | 1 +
> Documentation/RCU/{lockdep.txt => lockdep.rst} | 9 ++++++---
> 2 files changed, 7 insertions(+), 3 deletions(-)
> rename Documentation/RCU/{lockdep.txt => lockdep.rst} (97%)
>
> diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> index 81a0a1e5f767..109dea13f165 100644
> --- a/Documentation/RCU/index.rst
> +++ b/Documentation/RCU/index.rst
> @@ -10,6 +10,7 @@ RCU concepts
> arrayRCU
> rcubarrier
> rcu_dereference
> + lockdep
> whatisRCU
> rcu
> listRCU
> diff --git a/Documentation/RCU/lockdep.txt b/Documentation/RCU/lockdep.rst
> similarity index 97%
> rename from Documentation/RCU/lockdep.txt
> rename to Documentation/RCU/lockdep.rst
> index 89db949eeca0..3a88d8a59753 100644
> --- a/Documentation/RCU/lockdep.txt
> +++ b/Documentation/RCU/lockdep.rst
> @@ -1,4 +1,7 @@
> +.. _lockdep_doc:
> +
> RCU and lockdep checking
> +========================
>
> All flavors of RCU have lockdep checking available, so that lockdep is
> aware of when each task enters and leaves any flavor of RCU read-side
> @@ -63,7 +66,7 @@ checking of rcu_dereference() primitives:
> The rcu_dereference_check() check expression can be any boolean
> expression, but would normally include a lockdep expression. However,
> any boolean expression can be used. For a moderately ornate example,
> -consider the following:
> +consider the following::
>
> file = rcu_dereference_check(fdt->fd[fd],
> lockdep_is_held(&files->file_lock) ||
> @@ -82,7 +85,7 @@ RCU read-side critical sections, in case (2) the ->file_lock prevents
> any change from taking place, and finally, in case (3) the current task
> is the only task accessing the file_struct, again preventing any change
> from taking place. If the above statement was invoked only from updater
> -code, it could instead be written as follows:
> +code, it could instead be written as follows::
>
> file = rcu_dereference_protected(fdt->fd[fd],
> lockdep_is_held(&files->file_lock) ||
> @@ -105,7 +108,7 @@ false and they are called from outside any RCU read-side critical section.
>
> For example, the workqueue for_each_pwq() macro is intended to be used
> either within an RCU read-side critical section or with wq->mutex held.
> -It is thus implemented as follows:
> +It is thus implemented as follows::
>
> #define for_each_pwq(pwq, wq)
> list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node,
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-05 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 14:45 [PATCH RESEND] Documentation: RCU: lockdep.txt: Convert to lockdep.rst Pawan Kumar Meena
2020-03-05 0:10 ` Paul E. McKenney
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 NNTP newsgroup(s).