Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: Update RCU cross-references as suggested in doc-guide

The RCU documentation contains old-style cross references which
do not follow the best practices outlined in doc-guide/sphinx.rst.
In addition, some of the cross references use URLs that should be replaced
by pathnames.

Update all of these cross references and adjust the surrounding words.

Summary of changes:

- out-of-date plaintext file names (*.txt) -> *.rst
- references by :ref: tags -> path names of *.rst
* use relative paths to .rst files under the RCU/ subdirectory
* use abs paths of Documentation/xxx for other .rst files
- references by URL under https://www.kernel.org/ -> paths of *.rst
- adjust surrounding words of some of updated references.

Note:
The automarkup.py script interprets references via "*.txt" as if they
were via "*.rst", so the *.txt -> *.rst changes should be regarded as
cleanups rather than bug fixes.

Cc: rcu@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

authored by

Akira Yokosawa and committed by
Paul E. McKenney
404147fa 6172de3c

+25 -29
+1 -1
Documentation/RCU/Design/Data-Structures/Data-Structures.rst
··· 973 973 and from either dyntick-idle or user mode, so that this counter has an 974 974 even value when the CPU is in dyntick-idle mode or user mode and an odd 975 975 value otherwise. The transitions to/from user mode need to be counted 976 - for user mode adaptive-ticks support (see timers/NO_HZ.txt). 976 + for user mode adaptive-ticks support (see Documentation/timers/no_hz.rst). 977 977 978 978 The ``->rcu_need_heavy_qs`` field is used to record the fact that the 979 979 RCU core code would really like to see a quiescent state from the
+1 -1
Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.rst
··· 406 406 period also drove it to completion. This straightforward approach had 407 407 the disadvantage of needing to account for POSIX signals sent to user 408 408 tasks, so more recent implemementations use the Linux kernel's 409 - `workqueues <https://www.kernel.org/doc/Documentation/core-api/workqueue.rst>`__. 409 + workqueues (see Documentation/core-api/workqueue.rst). 410 410 411 411 The requesting task still does counter snapshotting and funnel-lock 412 412 processing, but the task reaching the top of the funnel lock does a
+2 -2
Documentation/RCU/Design/Requirements/Requirements.rst
··· 370 370 outermost RCU read-side critical section containing that 371 371 rcu_dereference(), unless protection of the corresponding data 372 372 element has been passed from RCU to some other synchronization 373 - mechanism, most commonly locking or `reference 374 - counting <https://www.kernel.org/doc/Documentation/RCU/rcuref.txt>`__. 373 + mechanism, most commonly locking or reference counting 374 + (see ../../rcuref.rst). 375 375 376 376 .. |high-quality implementation of C11 memory_order_consume [PDF]| replace:: high-quality implementation of C11 ``memory_order_consume`` [PDF] 377 377 .. _high-quality implementation of C11 memory_order_consume [PDF]: http://www.rdrop.com/users/paulmck/RCU/consume.2015.07.13a.pdf
+2 -2
Documentation/RCU/arrayRCU.rst
··· 33 33 34 34 Hash tables are often implemented as an array, where each array entry 35 35 has a linked-list hash chain. Each hash chain can be protected by RCU 36 - as described in the listRCU.txt document. This approach also applies 37 - to other array-of-list situations, such as radix trees. 36 + as described in listRCU.rst. This approach also applies to other 37 + array-of-list situations, such as radix trees. 38 38 39 39 .. _static_arrays: 40 40
+4 -5
Documentation/RCU/checklist.rst
··· 140 140 prevents destructive compiler optimizations. However, 141 141 with a bit of devious creativity, it is possible to 142 142 mishandle the return value from rcu_dereference(). 143 - Please see rcu_dereference.txt in this directory for 144 - more information. 143 + Please see rcu_dereference.rst for more information. 145 144 146 145 The rcu_dereference() primitive is used by the 147 146 various "_rcu()" list-traversal primitives, such ··· 150 151 primitives. This is particularly useful in code that 151 152 is common to readers and updaters. However, lockdep 152 153 will complain if you access rcu_dereference() outside 153 - of an RCU read-side critical section. See lockdep.txt 154 + of an RCU read-side critical section. See lockdep.rst 154 155 to learn what to do about this. 155 156 156 157 Of course, neither rcu_dereference() nor the "_rcu()" ··· 322 323 primitives when the update-side lock is held is that doing so 323 324 can be quite helpful in reducing code bloat when common code is 324 325 shared between readers and updaters. Additional primitives 325 - are provided for this case, as discussed in lockdep.txt. 326 + are provided for this case, as discussed in lockdep.rst. 326 327 327 328 One exception to this rule is when data is only ever added to 328 329 the linked data structure, and is never removed during any ··· 479 480 both rcu_barrier() and synchronize_rcu(), if necessary, using 480 481 something like workqueues to to execute them concurrently. 481 482 482 - See rcubarrier.txt for more information. 483 + See rcubarrier.rst for more information.
+6 -7
Documentation/RCU/rcu.rst
··· 10 10 must be long enough that any readers accessing the item being deleted have 11 11 since dropped their references. For example, an RCU-protected deletion 12 12 from a linked list would first remove the item from the list, wait for 13 - a grace period to elapse, then free the element. See the 14 - :ref:`Documentation/RCU/listRCU.rst <list_rcu_doc>` for more information on 15 - using RCU with linked lists. 13 + a grace period to elapse, then free the element. See listRCU.rst for more 14 + information on using RCU with linked lists. 16 15 17 16 Frequently Asked Questions 18 17 -------------------------- ··· 49 50 - If I am running on a uniprocessor kernel, which can only do one 50 51 thing at a time, why should I wait for a grace period? 51 52 52 - See :ref:`Documentation/RCU/UP.rst <up_doc>` for more information. 53 + See UP.rst for more information. 53 54 54 55 - How can I see where RCU is currently used in the Linux kernel? 55 56 ··· 63 64 64 65 - What guidelines should I follow when writing code that uses RCU? 65 66 66 - See the checklist.txt file in this directory. 67 + See checklist.rst. 67 68 68 69 - Why the name "RCU"? 69 70 70 71 "RCU" stands for "read-copy update". 71 - :ref:`Documentation/RCU/listRCU.rst <list_rcu_doc>` has more information on where 72 - this name came from, search for "read-copy update" to find it. 72 + listRCU.rst has more information on where this name came from, search 73 + for "read-copy update" to find it. 73 74 74 75 - I hear that RCU is patented? What is with that? 75 76
+1 -1
Documentation/RCU/rculist_nulls.rst
··· 8 8 protect read-mostly linked lists and 9 9 objects using SLAB_TYPESAFE_BY_RCU allocations. 10 10 11 - Please read the basics in Documentation/RCU/listRCU.rst 11 + Please read the basics in listRCU.rst. 12 12 13 13 Using 'nulls' 14 14 =============
+8 -10
Documentation/RCU/whatisRCU.rst
··· 224 224 be delayed. This property results in system resilience in face 225 225 of denial-of-service attacks. Code using call_rcu() should limit 226 226 update rate in order to gain this same sort of resilience. See 227 - checklist.txt for some approaches to limiting the update rate. 227 + checklist.rst for some approaches to limiting the update rate. 228 228 229 229 rcu_assign_pointer() 230 230 ^^^^^^^^^^^^^^^^^^^^ ··· 318 318 must prohibit. The rcu_dereference_protected() variant takes 319 319 a lockdep expression to indicate which locks must be acquired 320 320 by the caller. If the indicated protection is not provided, 321 - a lockdep splat is emitted. See Documentation/RCU/Design/Requirements/Requirements.rst 321 + a lockdep splat is emitted. See Design/Requirements/Requirements.rst 322 322 and the API's code comments for more details and example usage. 323 323 324 324 .. [2] If the list_for_each_entry_rcu() instance might be used by ··· 399 399 400 400 This section shows a simple use of the core RCU API to protect a 401 401 global pointer to a dynamically allocated structure. More-typical 402 - uses of RCU may be found in :ref:`listRCU.rst <list_rcu_doc>`, 403 - :ref:`arrayRCU.rst <array_rcu_doc>`, and :ref:`NMI-RCU.rst <NMI_rcu_doc>`. 402 + uses of RCU may be found in listRCU.rst, arrayRCU.rst, and NMI-RCU.rst. 404 403 :: 405 404 406 405 struct foo { ··· 481 482 RCU read-side critical sections that might be referencing that 482 483 data item. 483 484 484 - See checklist.txt for additional rules to follow when using RCU. 485 - And again, more-typical uses of RCU may be found in :ref:`listRCU.rst 486 - <list_rcu_doc>`, :ref:`arrayRCU.rst <array_rcu_doc>`, and :ref:`NMI-RCU.rst 487 - <NMI_rcu_doc>`. 485 + See checklist.rst for additional rules to follow when using RCU. 486 + And again, more-typical uses of RCU may be found in listRCU.rst, 487 + arrayRCU.rst, and NMI-RCU.rst. 488 488 489 489 .. _4_whatisRCU: 490 490 ··· 577 579 578 580 kfree_rcu(old_fp, rcu); 579 581 580 - Again, see checklist.txt for additional rules governing the use of RCU. 582 + Again, see checklist.rst for additional rules governing the use of RCU. 581 583 582 584 .. _5_whatisRCU: 583 585 ··· 661 663 promotes synchronize_rcu() to a full memory barrier in compliance with 662 664 the "Memory-Barrier Guarantees" listed in: 663 665 664 - Documentation/RCU/Design/Requirements/Requirements.rst 666 + Design/Requirements/Requirements.rst 665 667 666 668 It is possible to nest rcu_read_lock(), since reader-writer locks may 667 669 be recursively acquired. Note also that rcu_read_lock() is immune