mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 09:45:07 +07:00
a7ddcea58a
This is a respin with a wider audience (all that get_maintainer returned) and I know this spams a *lot* of people. Not sure what would be the correct way, so my apologies for ruining your inbox. The 00-INDEX files are supposed to give a summary of all files present in a directory, but these files are horribly out of date and their usefulness is brought into question. Often a simple "ls" would reveal the same information as the filenames are generally quite descriptive as a short introduction to what the file covers (it should not surprise anyone what Documentation/sched/sched-design-CFS.txt covers) A few years back it was mentioned that these files were no longer really needed, and they have since then grown further out of date, so perhaps it is time to just throw them out. A short status yields the following _outdated_ 00-INDEX files, first counter is files listed in 00-INDEX but missing in the directory, last is files present but not listed in 00-INDEX. List of outdated 00-INDEX: Documentation: (4/10) Documentation/sysctl: (0/1) Documentation/timers: (1/0) Documentation/blockdev: (3/1) Documentation/w1/slaves: (0/1) Documentation/locking: (0/1) Documentation/devicetree: (0/5) Documentation/power: (1/1) Documentation/powerpc: (0/5) Documentation/arm: (1/0) Documentation/x86: (0/9) Documentation/x86/x86_64: (1/1) Documentation/scsi: (4/4) Documentation/filesystems: (2/9) Documentation/filesystems/nfs: (0/2) Documentation/cgroup-v1: (0/2) Documentation/kbuild: (0/4) Documentation/spi: (1/0) Documentation/virtual/kvm: (1/0) Documentation/scheduler: (0/2) Documentation/fb: (0/1) Documentation/block: (0/1) Documentation/networking: (6/37) Documentation/vm: (1/3) Then there are 364 subdirectories in Documentation/ with several files that are missing 00-INDEX alltogether (and another 120 with a single file and no 00-INDEX). I don't really have an opinion to whether or not we /should/ have 00-INDEX, but the above 00-INDEX should either be removed or be kept up to date. If we should keep the files, I can try to keep them updated, but I rather not if we just want to delete them anyway. As a starting point, remove all index-files and references to 00-INDEX and see where the discussion is going. Signed-off-by: Henrik Austad <henrik@austad.us> Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Just-do-it-by: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Acked-by: Paul Moore <paul@paul-moore.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: [Almost everybody else] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
90 lines
3.7 KiB
Plaintext
90 lines
3.7 KiB
Plaintext
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", "call_rcu_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/.
|