* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 7:01 ` Jiunn Chang
0 siblings, 0 replies; 6+ messages in thread
From: c0d1n61at3 @ 2019-06-22 7:01 UTC (permalink / raw)
Convert RCU basic concepts and add TOC tree hook.
Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
---
Documentation/RCU/index.rst | 17 +++++++
Documentation/RCU/rcu.rst | 91 +++++++++++++++++++++++++++++++++++++
Documentation/RCU/rcu.txt | 89 ------------------------------------
3 files changed, 108 insertions(+), 89 deletions(-)
create mode 100644 Documentation/RCU/index.rst
create mode 100644 Documentation/RCU/rcu.rst
delete mode 100644 Documentation/RCU/rcu.txt
diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
new file mode 100644
index 000000000000..30d1f2f3133f
--- /dev/null
+++ b/Documentation/RCU/index.rst
@@ -0,0 +1,17 @@
+.. _rcu_concepts:
+
+============
+RCU concepts
+============
+
+.. toctree::
+ :maxdepth: 1
+
+ rcu
+
+.. only:: subproject and html
+
+ Indices
+ =======
+
+ * :ref:`genindex`
diff --git a/Documentation/RCU/rcu.rst b/Documentation/RCU/rcu.rst
new file mode 100644
index 000000000000..e95f023d6065
--- /dev/null
+++ b/Documentation/RCU/rcu.rst
@@ -0,0 +1,91 @@
+.. _rcu_doc:
+
+============
+RCU Concepts
+============
+
+The basic idea behind RCU (read-copy update) is to split destructive
+operations into two parts, one that prevents anyone from seeing the data
+item being destroyed, and one that actually carries out the destruction.
+A "grace period" must elapse between the two parts, and this grace period
+must be long enough that any readers accessing the item being deleted have
+since dropped their references. For example, an RCU-protected deletion
+from a linked list would first remove the item from the list, wait for
+a grace period to elapse, then free the element. See listRCU.txt
+for more information on using RCU with linked lists.
+
+Frequently Asked Questions
+
+- Why would anyone want to use RCU?
+
+ The advantage of RCU's two-part approach is that RCU readers need
+ not acquire any locks, perform any atomic instructions, write to
+ shared memory, or (on CPUs other than Alpha) execute any memory
+ barriers. The fact that these operations are quite expensive
+ on modern CPUs is what gives RCU its performance advantages
+ in read-mostly situations. The fact that RCU readers need not
+ acquire locks can also greatly simplify deadlock-avoidance code.
+
+- How can the updater tell when a grace period has completed
+ if the RCU readers give no indication when they are done?
+
+ Just as with spinlocks, RCU readers are not permitted to
+ block, switch to user-mode execution, or enter the idle loop.
+ Therefore, as soon as a CPU is seen passing through any of these
+ three states, we know that that CPU has exited any previous RCU
+ read-side critical sections. So, if we remove an item from a
+ linked list, and then wait until all CPUs have switched context,
+ executed in user mode, or executed in the idle loop, we can
+ safely free up that item.
+
+ Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
+ same effect, but require that the readers manipulate CPU-local
+ counters. These counters allow limited types of blocking within
+ RCU read-side critical sections. SRCU also uses CPU-local
+ counters, and permits general blocking within RCU read-side
+ critical sections. These variants of RCU detect grace periods
+ by sampling these counters.
+
+- If I am running on a uniprocessor kernel, which can only do one
+ thing at a time, why should I wait for a grace period?
+
+ See UP.txt for more information.
+
+- How can I see where RCU is currently used in the Linux kernel?
+
+ Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
+ "rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
+ "srcu_read_unlock", "synchronize_rcu", "synchronize_net",
+ "synchronize_srcu", and the other RCU primitives. Or grab one
+ of the cscope databases from:
+
+ (http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html).
+
+- What guidelines should I follow when writing code that uses RCU?
+
+ See checklist.txt for more information.
+
+- Why the name "RCU"?
+
+ "RCU" stands for "read-copy update". listRCU.txt has
+ more information on where this name came from, search for
+ "read-copy update" to find it.
+
+- I hear that RCU is patented? What is with that?
+
+ Yes, it is. There are several known patents related to RCU,
+ search for the string "Patent" in RTFP.txt to find them.
+ Of these, one was allowed to lapse by the assignee, and the
+ others have been contributed to the Linux kernel under GPL.
+ There are now also LGPL implementations of user-level RCU
+ available (http://liburcu.org/).
+
+- I hear that RCU needs work in order to support realtime kernels?
+
+ Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
+ kernel configuration parameter.
+
+- Where can I find more information on RCU?
+
+ See RTFP.txt for more information.
+ Or point your browser at (http://www.rdrop.com/users/paulmck/RCU/).
diff --git a/Documentation/RCU/rcu.txt b/Documentation/RCU/rcu.txt
deleted file mode 100644
index c818cf65c5a9..000000000000
--- a/Documentation/RCU/rcu.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-RCU Concepts
-
-
-The basic idea behind RCU (read-copy update) is to split destructive
-operations into two parts, one that prevents anyone from seeing the data
-item being destroyed, and one that actually carries out the destruction.
-A "grace period" must elapse between the two parts, and this grace period
-must be long enough that any readers accessing the item being deleted have
-since dropped their references. For example, an RCU-protected deletion
-from a linked list would first remove the item from the list, wait for
-a grace period to elapse, then free the element. See the listRCU.txt
-file for more information on using RCU with linked lists.
-
-
-Frequently Asked Questions
-
-o Why would anyone want to use RCU?
-
- The advantage of RCU's two-part approach is that RCU readers need
- not acquire any locks, perform any atomic instructions, write to
- shared memory, or (on CPUs other than Alpha) execute any memory
- barriers. The fact that these operations are quite expensive
- on modern CPUs is what gives RCU its performance advantages
- in read-mostly situations. The fact that RCU readers need not
- acquire locks can also greatly simplify deadlock-avoidance code.
-
-o How can the updater tell when a grace period has completed
- if the RCU readers give no indication when they are done?
-
- Just as with spinlocks, RCU readers are not permitted to
- block, switch to user-mode execution, or enter the idle loop.
- Therefore, as soon as a CPU is seen passing through any of these
- three states, we know that that CPU has exited any previous RCU
- read-side critical sections. So, if we remove an item from a
- linked list, and then wait until all CPUs have switched context,
- executed in user mode, or executed in the idle loop, we can
- safely free up that item.
-
- Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
- same effect, but require that the readers manipulate CPU-local
- counters. These counters allow limited types of blocking within
- RCU read-side critical sections. SRCU also uses CPU-local
- counters, and permits general blocking within RCU read-side
- critical sections. These variants of RCU detect grace periods
- by sampling these counters.
-
-o If I am running on a uniprocessor kernel, which can only do one
- thing at a time, why should I wait for a grace period?
-
- See the UP.txt file in this directory.
-
-o How can I see where RCU is currently used in the Linux kernel?
-
- Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
- "rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
- "srcu_read_unlock", "synchronize_rcu", "synchronize_net",
- "synchronize_srcu", and the other RCU primitives. Or grab one
- of the cscope databases from:
-
- http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html
-
-o What guidelines should I follow when writing code that uses RCU?
-
- See the checklist.txt file in this directory.
-
-o Why the name "RCU"?
-
- "RCU" stands for "read-copy update". The file listRCU.txt has
- more information on where this name came from, search for
- "read-copy update" to find it.
-
-o I hear that RCU is patented? What is with that?
-
- Yes, it is. There are several known patents related to RCU,
- search for the string "Patent" in RTFP.txt to find them.
- Of these, one was allowed to lapse by the assignee, and the
- others have been contributed to the Linux kernel under GPL.
- There are now also LGPL implementations of user-level RCU
- available (http://liburcu.org/).
-
-o I hear that RCU needs work in order to support realtime kernels?
-
- Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
- kernel configuration parameter.
-
-o Where can I find more information on RCU?
-
- See the RTFP.txt file in this directory.
- Or point your browser at http://www.rdrop.com/users/paulmck/RCU/.
--
2.22.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 7:01 ` Jiunn Chang
0 siblings, 0 replies; 6+ messages in thread
From: Jiunn Chang @ 2019-06-22 7:01 UTC (permalink / raw)
Convert RCU basic concepts and add TOC tree hook.
Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
---
Documentation/RCU/index.rst | 17 +++++++
Documentation/RCU/rcu.rst | 91 +++++++++++++++++++++++++++++++++++++
Documentation/RCU/rcu.txt | 89 ------------------------------------
3 files changed, 108 insertions(+), 89 deletions(-)
create mode 100644 Documentation/RCU/index.rst
create mode 100644 Documentation/RCU/rcu.rst
delete mode 100644 Documentation/RCU/rcu.txt
diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
new file mode 100644
index 000000000000..30d1f2f3133f
--- /dev/null
+++ b/Documentation/RCU/index.rst
@@ -0,0 +1,17 @@
+.. _rcu_concepts:
+
+============
+RCU concepts
+============
+
+.. toctree::
+ :maxdepth: 1
+
+ rcu
+
+.. only:: subproject and html
+
+ Indices
+ =======
+
+ * :ref:`genindex`
diff --git a/Documentation/RCU/rcu.rst b/Documentation/RCU/rcu.rst
new file mode 100644
index 000000000000..e95f023d6065
--- /dev/null
+++ b/Documentation/RCU/rcu.rst
@@ -0,0 +1,91 @@
+.. _rcu_doc:
+
+============
+RCU Concepts
+============
+
+The basic idea behind RCU (read-copy update) is to split destructive
+operations into two parts, one that prevents anyone from seeing the data
+item being destroyed, and one that actually carries out the destruction.
+A "grace period" must elapse between the two parts, and this grace period
+must be long enough that any readers accessing the item being deleted have
+since dropped their references. For example, an RCU-protected deletion
+from a linked list would first remove the item from the list, wait for
+a grace period to elapse, then free the element. See listRCU.txt
+for more information on using RCU with linked lists.
+
+Frequently Asked Questions
+
+- Why would anyone want to use RCU?
+
+ The advantage of RCU's two-part approach is that RCU readers need
+ not acquire any locks, perform any atomic instructions, write to
+ shared memory, or (on CPUs other than Alpha) execute any memory
+ barriers. The fact that these operations are quite expensive
+ on modern CPUs is what gives RCU its performance advantages
+ in read-mostly situations. The fact that RCU readers need not
+ acquire locks can also greatly simplify deadlock-avoidance code.
+
+- How can the updater tell when a grace period has completed
+ if the RCU readers give no indication when they are done?
+
+ Just as with spinlocks, RCU readers are not permitted to
+ block, switch to user-mode execution, or enter the idle loop.
+ Therefore, as soon as a CPU is seen passing through any of these
+ three states, we know that that CPU has exited any previous RCU
+ read-side critical sections. So, if we remove an item from a
+ linked list, and then wait until all CPUs have switched context,
+ executed in user mode, or executed in the idle loop, we can
+ safely free up that item.
+
+ Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
+ same effect, but require that the readers manipulate CPU-local
+ counters. These counters allow limited types of blocking within
+ RCU read-side critical sections. SRCU also uses CPU-local
+ counters, and permits general blocking within RCU read-side
+ critical sections. These variants of RCU detect grace periods
+ by sampling these counters.
+
+- If I am running on a uniprocessor kernel, which can only do one
+ thing at a time, why should I wait for a grace period?
+
+ See UP.txt for more information.
+
+- How can I see where RCU is currently used in the Linux kernel?
+
+ Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
+ "rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
+ "srcu_read_unlock", "synchronize_rcu", "synchronize_net",
+ "synchronize_srcu", and the other RCU primitives. Or grab one
+ of the cscope databases from:
+
+ (http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html).
+
+- What guidelines should I follow when writing code that uses RCU?
+
+ See checklist.txt for more information.
+
+- Why the name "RCU"?
+
+ "RCU" stands for "read-copy update". listRCU.txt has
+ more information on where this name came from, search for
+ "read-copy update" to find it.
+
+- I hear that RCU is patented? What is with that?
+
+ Yes, it is. There are several known patents related to RCU,
+ search for the string "Patent" in RTFP.txt to find them.
+ Of these, one was allowed to lapse by the assignee, and the
+ others have been contributed to the Linux kernel under GPL.
+ There are now also LGPL implementations of user-level RCU
+ available (http://liburcu.org/).
+
+- I hear that RCU needs work in order to support realtime kernels?
+
+ Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
+ kernel configuration parameter.
+
+- Where can I find more information on RCU?
+
+ See RTFP.txt for more information.
+ Or point your browser at (http://www.rdrop.com/users/paulmck/RCU/).
diff --git a/Documentation/RCU/rcu.txt b/Documentation/RCU/rcu.txt
deleted file mode 100644
index c818cf65c5a9..000000000000
--- a/Documentation/RCU/rcu.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-RCU Concepts
-
-
-The basic idea behind RCU (read-copy update) is to split destructive
-operations into two parts, one that prevents anyone from seeing the data
-item being destroyed, and one that actually carries out the destruction.
-A "grace period" must elapse between the two parts, and this grace period
-must be long enough that any readers accessing the item being deleted have
-since dropped their references. For example, an RCU-protected deletion
-from a linked list would first remove the item from the list, wait for
-a grace period to elapse, then free the element. See the listRCU.txt
-file for more information on using RCU with linked lists.
-
-
-Frequently Asked Questions
-
-o Why would anyone want to use RCU?
-
- The advantage of RCU's two-part approach is that RCU readers need
- not acquire any locks, perform any atomic instructions, write to
- shared memory, or (on CPUs other than Alpha) execute any memory
- barriers. The fact that these operations are quite expensive
- on modern CPUs is what gives RCU its performance advantages
- in read-mostly situations. The fact that RCU readers need not
- acquire locks can also greatly simplify deadlock-avoidance code.
-
-o How can the updater tell when a grace period has completed
- if the RCU readers give no indication when they are done?
-
- Just as with spinlocks, RCU readers are not permitted to
- block, switch to user-mode execution, or enter the idle loop.
- Therefore, as soon as a CPU is seen passing through any of these
- three states, we know that that CPU has exited any previous RCU
- read-side critical sections. So, if we remove an item from a
- linked list, and then wait until all CPUs have switched context,
- executed in user mode, or executed in the idle loop, we can
- safely free up that item.
-
- Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
- same effect, but require that the readers manipulate CPU-local
- counters. These counters allow limited types of blocking within
- RCU read-side critical sections. SRCU also uses CPU-local
- counters, and permits general blocking within RCU read-side
- critical sections. These variants of RCU detect grace periods
- by sampling these counters.
-
-o If I am running on a uniprocessor kernel, which can only do one
- thing at a time, why should I wait for a grace period?
-
- See the UP.txt file in this directory.
-
-o How can I see where RCU is currently used in the Linux kernel?
-
- Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
- "rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
- "srcu_read_unlock", "synchronize_rcu", "synchronize_net",
- "synchronize_srcu", and the other RCU primitives. Or grab one
- of the cscope databases from:
-
- http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html
-
-o What guidelines should I follow when writing code that uses RCU?
-
- See the checklist.txt file in this directory.
-
-o Why the name "RCU"?
-
- "RCU" stands for "read-copy update". The file listRCU.txt has
- more information on where this name came from, search for
- "read-copy update" to find it.
-
-o I hear that RCU is patented? What is with that?
-
- Yes, it is. There are several known patents related to RCU,
- search for the string "Patent" in RTFP.txt to find them.
- Of these, one was allowed to lapse by the assignee, and the
- others have been contributed to the Linux kernel under GPL.
- There are now also LGPL implementations of user-level RCU
- available (http://liburcu.org/).
-
-o I hear that RCU needs work in order to support realtime kernels?
-
- Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
- kernel configuration parameter.
-
-o Where can I find more information on RCU?
-
- See the RTFP.txt file in this directory.
- Or point your browser at http://www.rdrop.com/users/paulmck/RCU/.
--
2.22.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 14:54 ` Jonathan Corbet
0 siblings, 0 replies; 6+ messages in thread
From: corbet @ 2019-06-22 14:54 UTC (permalink / raw)
On Sat, 22 Jun 2019 02:01:33 -0500
Jiunn Chang <c0d1n61at3 at gmail.com> wrote:
> Convert RCU basic concepts and add TOC tree hook.
>
> Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
A few overall comments...
- Hopefully Paul is OK with converting these documents. If not, Paul,
now seems like the time to complain :)
- It's good to have a cover letter on a multi-part patch set like this
describing the overall project. It's also important to copy patches to
a public list. At a minimum, linux-doc would be a good place; I'd
suggest linux-kernel as well - it doesn't get enough email and people
get lonely there.
- (The part that people get mad at me about): we should think about
whether this should remain a top-level directory. I would argue for
putting it into the core-api manual, but others may disagree.
Thanks for working to improve our docs! In this case, the conversion
itself looks good.
jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 14:54 ` Jonathan Corbet
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2019-06-22 14:54 UTC (permalink / raw)
On Sat, 22 Jun 2019 02:01:33 -0500
Jiunn Chang <c0d1n61at3 at gmail.com> wrote:
> Convert RCU basic concepts and add TOC tree hook.
>
> Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
A few overall comments...
- Hopefully Paul is OK with converting these documents. If not, Paul,
now seems like the time to complain :)
- It's good to have a cover letter on a multi-part patch set like this
describing the overall project. It's also important to copy patches to
a public list. At a minimum, linux-doc would be a good place; I'd
suggest linux-kernel as well - it doesn't get enough email and people
get lonely there.
- (The part that people get mad at me about): we should think about
whether this should remain a top-level directory. I would argue for
putting it into the core-api manual, but others may disagree.
Thanks for working to improve our docs! In this case, the conversion
itself looks good.
jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 17:03 ` Paul E. McKenney
0 siblings, 0 replies; 6+ messages in thread
From: paulmck @ 2019-06-22 17:03 UTC (permalink / raw)
On Sat, Jun 22, 2019 at 08:54:11AM -0600, Jonathan Corbet wrote:
> On Sat, 22 Jun 2019 02:01:33 -0500
> Jiunn Chang <c0d1n61at3 at gmail.com> wrote:
>
> > Convert RCU basic concepts and add TOC tree hook.
> >
> > Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
>
> A few overall comments...
>
> - Hopefully Paul is OK with converting these documents. If not, Paul,
> now seems like the time to complain :)
No complaints here!
> - It's good to have a cover letter on a multi-part patch set like this
> describing the overall project. It's also important to copy patches to
> a public list. At a minimum, linux-doc would be a good place; I'd
> suggest linux-kernel as well - it doesn't get enough email and people
> get lonely there.
Heh! For RCU documentation patches, please also CC rcu at vger.kernel.org.
> - (The part that people get mad at me about): we should think about
> whether this should remain a top-level directory. I would argue for
> putting it into the core-api manual, but others may disagree.
Let's worry about that separately.
> Thanks for working to improve our docs! In this case, the conversion
> itself looks good.
I will do a build and check within the next few days, and will more
carefully review your next version of this patch series.
Thanx, Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST
@ 2019-06-22 17:03 ` Paul E. McKenney
0 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2019-06-22 17:03 UTC (permalink / raw)
On Sat, Jun 22, 2019 at 08:54:11AM -0600, Jonathan Corbet wrote:
> On Sat, 22 Jun 2019 02:01:33 -0500
> Jiunn Chang <c0d1n61at3 at gmail.com> wrote:
>
> > Convert RCU basic concepts and add TOC tree hook.
> >
> > Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
>
> A few overall comments...
>
> - Hopefully Paul is OK with converting these documents. If not, Paul,
> now seems like the time to complain :)
No complaints here!
> - It's good to have a cover letter on a multi-part patch set like this
> describing the overall project. It's also important to copy patches to
> a public list. At a minimum, linux-doc would be a good place; I'd
> suggest linux-kernel as well - it doesn't get enough email and people
> get lonely there.
Heh! For RCU documentation patches, please also CC rcu at vger.kernel.org.
> - (The part that people get mad at me about): we should think about
> whether this should remain a top-level directory. I would argue for
> putting it into the core-api manual, but others may disagree.
Let's worry about that separately.
> Thanks for working to improve our docs! In this case, the conversion
> itself looks good.
I will do a build and check within the next few days, and will more
carefully review your next version of this patch series.
Thanx, Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-06-22 17:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-22 7:01 [Linux-kernel-mentees] [PATCH 1/3] Documentation: RCU: Convert RCU basic concepts to ReST c0d1n61at3
2019-06-22 7:01 ` Jiunn Chang
2019-06-22 14:54 ` corbet
2019-06-22 14:54 ` Jonathan Corbet
2019-06-22 17:03 ` paulmck
2019-06-22 17:03 ` 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.