Skip to contentSkip to conversation

RCU docs updates for v6.7

PATCH New Frederic Weisbecker 1 participant 4 messages Oct 10, 2023

Subsystems (2)
lore
Share & tools
lore

Frederic Weisbecker

author maintainer
#0 lore raw

cover RCU docs updates for v6.7

Hello,

This series contains RCU documentation updates:

1. RCU: Fix section numbers after adding Section 7 in whatisRCU.rst

2. Describe listRCU read-side guarantees

3. Remove references to rcu_migrate_callbacks() from diagrams

Thanks,
Frederic.

 .../Design/Memory-Ordering/TreeRCU-callback-registry.svg | 9 ---------
 Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp.svg  | 9 ---------
 Documentation/RCU/listRCU.rst                            | 9 +++++++++
 Documentation/RCU/whatisRCU.rst                          | 4 ++--
 4 files changed, 11 insertions(+), 20 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/3 Documentation: RCU: Fix section numbers after adding Section 7 in whatisRCU.rst

From: Wei Zhang <[email protected]>

---
 Documentation/RCU/whatisRCU.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/RCU/whatisRCU.rst +2 -2
index e488c8e557a9..60ce02475142 100644
@@ -59,8 +59,8 @@ experiment with should focus on Section 2.  People who prefer to start
 with example uses should focus on Sections 3 and 4.  People who need to
 understand the RCU implementation should focus on Section 5, then dive
 into the kernel source code.  People who reason best by analogy should
-focus on Section 6.  Section 7 serves as an index to the docbook API
-documentation, and Section 8 is the traditional answer key.
+focus on Section 6 and 7.  Section 8 serves as an index to the docbook
+API documentation, and Section 9 is the traditional answer key.
 
 So, start with the section that makes the most sense to you and your
 preferred method of learning.  If you need to know everything about
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/3 rcu: Describe listRCU read-side guarantees

In reply to Frederic Weisbecker

From: "Matthew Wilcox (Oracle)" <[email protected]>

More explicitly state what is, and what is not guaranteed to those who iterate a list while protected by RCU.

[ paulmck: Apply Joel Fernandes feedback. ]

---
 Documentation/RCU/listRCU.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/RCU/listRCU.rst +9 -0
index bdc4bcc5289f..ed5c9d8c9afe 100644
@@ -8,6 +8,15 @@ One of the most common uses of RCU is protecting read-mostly linked lists
 that all of the required memory ordering is provided by the list macros.
 This document describes several list-based RCU use cases.
 
+When iterating a list while holding the rcu_read_lock(), writers may
+modify the list.  The reader is guaranteed to see all of the elements
+which were added to the list before they acquired the rcu_read_lock()
+and are still on the list when they drop the rcu_read_unlock().
+Elements which are added to, or removed from the list may or may not
+be seen.  If the writer calls list_replace_rcu(), the reader may see
+either the old element or the new element; they will not see both,
+nor will they see neither.
+
 
 Example 1: Read-mostly list: Deferred Destruction
 -------------------------------------------------
Signature · 1 line
2.34.1
author maintainer
#3 lore raw

PATCH 3/3 rcu: Remove references to rcu_migrate_callbacks() from diagrams

In reply to Frederic Weisbecker

This function is gone since:

53b46303da84 (rcu: Remove rsp parameter from rcu_boot_init_percpu_data() and friends)

---
 .../Design/Memory-Ordering/TreeRCU-callback-registry.svg | 9 ---------
 Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp.svg  | 9 ---------
 2 files changed, 18 deletions(-)
Documentation/RCU/Design/Memory-Ordering/TreeRCU-callback-registry.svg +0 -9
index 7ac6f9269806..63eff867175a 100644
@@ -564,15 +564,6 @@
        font-size="192"
        id="text202-7-9-6"
        style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcutree_migrate_callbacks()</text>
-    <text
-       xml:space="preserve"
-       x="8335.4873"
-       y="5357.1006"
-       font-style="normal"
-       font-weight="bold"
-       font-size="192"
-       id="text202-7-9-6-0"
-       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_migrate_callbacks()</text>
     <text
        xml:space="preserve"
        x="8768.4678"
Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp.svg +0 -9
index 069f6f8371c2..e4a66f8e92c5 100644
@@ -1446,15 +1446,6 @@
        font-size="192"
        id="text202-7-9-6"
        style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcutree_migrate_callbacks()</text>
-    <text
-       xml:space="preserve"
-       x="8335.4873"
-       y="5357.1006"
-       font-style="normal"
-       font-weight="bold"
-       font-size="192"
-       id="text202-7-9-6-0"
-       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_migrate_callbacks()</text>
     <text
        xml:space="preserve"
        x="8768.4678"
Signature · 1 line
2.34.1