07 Oct, 2015
1 commit
-
As there is lots of misinformation and outdated information on the
Internet about nearly all topics related to the kernel, I thought it
would be best if I based my RCU code on the guidelines of the examples
in the Documentation/ tree of the latest kernel. One thing that stuck
out when reading the whatisRCU.txt document was, "interesting how we
don't need any function to dereference rcu protected pointers when doing
updates if a lock is held. I wonder how static analyzers will work with
that." Then, a few weeks later, upon discovering sparse's __rcu support,
I ran it over my code, and lo and behold, things weren't done right.
Examining other RCU usages in the kernel reveal consistent usage of
rcu_dereference_protected, passing in lockdep_is_held as the
conditional. So, this patch adds that idiom to the documentation, so
that others ahead of me won't endure the same exercise.Signed-off-by: Jason A. Donenfeld
Signed-off-by: Paul E. McKenney
Reviewed-by: Josh Triplett
23 Jul, 2015
1 commit
-
This commit renames rcu_lockdep_assert() to RCU_LOCKDEP_WARN() for
consistency with the WARN() series of macros. This also requires
inverting the sense of the conditional, which this commit also does.Reported-by: Ingo Molnar
Signed-off-by: Paul E. McKenney
Reviewed-by: Ingo Molnar
28 May, 2015
3 commits
-
…plug.2015.05.27a', 'init.2015.05.27a', 'tiny.2015.05.27a' and 'torture.2015.05.27a' into HEAD
array.2015.05.27a: Remove all uses of RCU-protected array indexes.
doc.2015.05.27a: Docuemntation updates.
fixes.2015.05.27a: Miscellaneous fixes.
hotplug.2015.05.27a: CPU-hotplug updates.
init.2015.05.27a: Initialization/Kconfig updates.
tiny.2015.05.27a: Updates to Tiny RCU.
torture.2015.05.27a: Torture-testing updates. -
Make a note stating that repeated calls of rcu_dereference() may not
return the same pointer if update happens while in critical section.Reported-by: Jeff Haran
Signed-off-by: Milos Vyletel
Reviewed-by: Steven Rostedt
Signed-off-by: Paul E. McKenney -
Signed-off-by: Paul E. McKenney
30 Oct, 2014
1 commit
-
PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after
TINY_PREEMPT_RCU has been removed. This patch removes TREE_PREEMPT_RCU
and uses PREEMPT_RCU config option in its place.Signed-off-by: Pranith Kumar
Signed-off-by: Paul E. McKenney
07 Aug, 2014
1 commit
-
All other add functions for lists have the new item as first argument
and the position where it is added as second argument. This was changed
for no good reason in this function and makes using it unnecessary
confusing.The name was changed to hlist_add_behind() to cause unconverted code to
generate a compile error instead of using the wrong parameter order.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ken Helias
Cc: "Paul E. McKenney"
Acked-by: Jeff Kirsher [intel driver bits]
Cc: Hugh Dickins
Cc: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Apr, 2014
1 commit
-
This commit updates the list of RCU API members in whatisRCU.txt.
Signed-off-by: Paul E. McKenney
Reviewed-by: Josh Triplett
11 Jun, 2013
1 commit
-
These interfaces never did get used, so this commit removes them,
their rcutorture tests, and documentation referencing them.Signed-off-by: Paul E. McKenney
Reviewed-by: Lai Jiangshan
Reviewed-by: Josh Triplett
13 Mar, 2013
1 commit
-
One of the code samples in whatisRCU.txt shows a bug, but someone scanning
the document quickly might mistake it for a valid use of RCU. Add some
screaming comments to help keep speed-readers on track.Reported-by: Nathan Zimmer
Signed-off-by: Paul E. McKenney
Acked-by: Rafael J. Wysocki
17 Nov, 2012
1 commit
-
…cu.2012.10.27a', 'stall.2012.11.13a', 'tracing.2012.11.08a' and 'idle.2012.10.24a' into HEAD
urgent.2012.10.27a: Fix for RCU user-mode transition (already in -tip).
doc.2012.11.08a: Documentation updates, most notably codifying the
memory-barrier guarantees inherent to grace periods.fixes.2012.11.13a: Miscellaneous fixes.
srcu.2012.10.27a: Allow statically allocated and initialized srcu_struct
structures (courtesy of Lai Jiangshan).stall.2012.11.13a: Add more diagnostic information to RCU CPU stall
warnings, also decrease from 60 seconds to 21 seconds.hotplug.2012.11.08a: Minor updates to CPU hotplug handling.
tracing.2012.11.08a: Improved debugfs tracing, courtesy of Michael Wang.
idle.2012.10.24a: Updates to RCU idle/adaptive-idle handling, including
a boot parameter that maps normal grace periods to expedited.Resolved conflict in kernel/rcutree.c due to side-by-side change.
14 Nov, 2012
1 commit
-
The list_for_each_continue_rcu() macro is no longer used, so this commit
removes it. The list_for_each_entry_continue_rcu() macro should be
used instead.Signed-off-by: Paul E. McKenney
09 Nov, 2012
1 commit
-
Mention kfree_rcu() in the call_rcu() section. Additionally fix the
example code for list replacement that used the wrong structure element.Signed-off-by: Kees Cook
Signed-off-by: Paul E. McKenney
23 Sep, 2012
1 commit
-
The current documentation did not help someone grepping for SRCU to
learn that disabling preemption is not a replacement for srcu_read_lock(),
so upgrade the documentation to bring this out, not just for SRCU,
but also for RCU-bh. Also document the fact that SRCU readers are
respected on CPUs executing in user mode, idle CPUs, and even on
offline CPUs.Signed-off-by: Paul E. McKenney
Reviewed-by: Josh Triplett
Reviewed-by: Lai Jiangshan
03 Jul, 2012
1 commit
-
The advent of call_srcu() and srcu_barrier() obsoleted some of the
documentation, so this commit brings that up to date.Signed-off-by: Paul E. McKenney
12 Dec, 2011
2 commits
-
Tyler Hicks pointed me at an additional article on RCU and I figured
it should probably be mentioned with the others.Signed-off-by: Kees Cook
Signed-off-by: Paul E. McKenney -
Update various files in Documentation/RCU to reflect srcu_read_lock_raw()
and srcu_read_unlock_raw(). Credit to Peter Zijlstra for suggesting
use of the existing _raw suffix instead of the earlier bulkref names.Signed-off-by: Paul E. McKenney
05 Mar, 2011
1 commit
-
Reported-by: Paul Mackerras
Signed-off-by: Paul E. McKenney
14 Apr, 2010
1 commit
-
Update examples and lists of APIs to include these new
primitives.Signed-off-by: Paul E. McKenney
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
Cc: eric.dumazet@gmail.com
LKML-Reference:
Signed-off-by: Ingo Molnar
25 Feb, 2010
1 commit
-
Adds a lockdep.txt file and updates checklist.txt and
whatisRCU.txt to reflect the new lockdep-enabled capabilities of
RCU.Signed-off-by: Paul E. McKenney
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference:
Signed-off-by: Ingo Molnar
16 Jan, 2010
1 commit
-
Add expedited functions. Review documentation and update
obsolete verbiage. Also fix the advice for the RCU CPU-stall
kernel configuration parameter, and document RCU CPU-stall
warnings.Signed-off-by: Paul E. McKenney
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference:
Signed-off-by: Ingo Molnar
26 Oct, 2009
1 commit
-
Signed-off-by: Paul E. McKenney
Acked-by: Josh Triplett
Reviewed-by: Lai Jiangshan
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
Cc: avi@redhat.com
Cc: mtosatti@redhat.com
LKML-Reference:
Signed-off-by: Ingo Molnar
23 Aug, 2009
1 commit
-
Now that CONFIG_TREE_PREEMPT_RCU is in place, there is no
further need for CONFIG_PREEMPT_RCU. Remove it, along with
whatever subtle bugs it may (or may not) contain.Signed-off-by: Paul E. McKenney
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josht@linux.vnet.ibm.com
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
LKML-Reference:
Signed-off-by: Ingo Molnar
03 Jul, 2009
1 commit
-
This patch updates the rcutorture documentation to include
updated output format. It also brings the RCU documentation up
to date.Signed-off-by: Paul E. McKenney
Cc: akpm@linux-foundation.org
Cc: torvalds@linux-foundation.org
Cc: davem@davemloft.net
Cc: dada1@cosmosbay.com
Cc: zbr@ioremap.net
Cc: jeff.chua.linux@gmail.com
Cc: paulus@samba.org
Cc: laijs@cn.fujitsu.com
Cc: jengelh@medozas.de
Cc: r000n@r000n.net
Cc: benh@kernel.crashing.org
Cc: mathieu.desnoyers@polymtl.ca
LKML-Reference:
Signed-off-by: Ingo Molnar
15 Aug, 2008
1 commit
-
All of the in-tree uses of list_for_each_rcu() have been converted to
list_for_each_entry_rcu(), so list_for_each_rcu() can now be removed.Signed-off-by: Paul E. McKenney
Signed-off-by: Ingo Molnar
19 May, 2008
1 commit
-
Long-delayed update to the RCU documentation, including adding the new
call_rcu_sched() and rcu_barrier_sched() APIs.Signed-off-by: Paul E. McKenney
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
04 Oct, 2006
3 commits
-
Updated patch adding a variant of RCU that permits sleeping in read-side
critical sections. SRCU is as follows:o Each use of SRCU creates its own srcu_struct, and each
srcu_struct has its own set of grace periods. This is
critical, as it prevents one subsystem with a blocking
reader from holding up SRCU grace periods for other
subsystems.o The SRCU primitives (srcu_read_lock(), srcu_read_unlock(),
and synchronize_srcu()) all take a pointer to a srcu_struct.o The SRCU primitives must be called from process context.
o srcu_read_lock() returns an int that must be passed to
the matching srcu_read_unlock(). Realtime RCU avoids the
need for this by storing the state in the task struct,
but SRCU needs to allow a given code path to pass through
multiple SRCU domains -- storing state in the task struct
would therefore require either arbitrary space in the
task struct or arbitrary limits on SRCU nesting. So I
kicked the state-storage problem up to the caller.Of course, it is not permitted to call synchronize_srcu()
while in an SRCU read-side critical section.o There is no call_srcu(). It would not be hard to implement
one, but it seems like too easy a way to OOM the system.
(Hey, we have enough trouble with call_rcu(), which does
-not- permit readers to sleep!!!) So, if you want it,
please tell me why...[josht@us.ibm.com: sparse notation]
Signed-off-by: Paul E. McKenney
Signed-off-by: Josh Triplett
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove many duplicated words under Documentation/ and do other small
cleanups.Examples:
"and and" --> "and"
"in in" --> "in"
"the the" --> "the"
"the the" --> "to the"
...Signed-off-by: Paolo Ornati
Signed-off-by: Adrian Bunk -
This patch fixes typos in various Documentation txts. The patch addresses
some words starting with the letter 'S'.Signed-off-by: Matt LaPlante
Acked-by: Alan Cox
Acked-by: Randy Dunlap
Signed-off-by: Adrian Bunk
11 Jul, 2006
1 commit
-
Updater should use _rcu variant of list_del().
Signed-off-by: Urs Thuermann
Acked-by: "Paul E. McKenney"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jun, 2006
1 commit
-
An update to the RCU documentation calling out the
self-limiting-update-rate advantages of synchronize_rcu(), and describing
how to use call_rcu() in a way that results in self-limiting updates.
Self-limiting updates are important to avoiding RCU-induced OOM in face of
denial-of-service attacks.Signed-off-by: Paul E. McKenney
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2006
1 commit
-
Remove synchronize_kernel() (deprecated 2-APR-2005 in
http://lkml.org/lkml/2005/4/3/11) and makes the RCU API inaccessible to
non-GPL Linux kernel modules (as was announced more than one year ago in
http://lkml.org/lkml/2005/4/3/8). Tested on x86 and ppc64.Signed-off-by: "Paul E. McKenney"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Mar, 2006
1 commit
-
Replace for_each_cpu with for_each_possible_cpu.
Modifies occurences in documentaion.
for_each_cpu in whatisRCU.txt should be for_each_online_cpu ???
(I'm not sure..)Signed-off-by: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Mar, 2006
1 commit
-
The RCU documentation uses an fp variable which is not declared in the code
snippets. Use the new_fp variable instead.Signed-Off-By: Baruch Even
Acked-by:
Signed-off-by: Adrian Bunk
02 Feb, 2006
1 commit
-
Updates to in-tree RCU documentation based on comments over the past few
months.Signed-off-by: "Paul E. McKenney"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Nov, 2005
1 commit
-
Remove the hlist_for_each_rcu() API, which is used only in one place, and
is trivially converted to hlist_for_each_entry_rcu(), making the code
shorter and more readable. Any out-of-tree uses may be similarly
converted.Signed-off-by: "Paul E. McKenney"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Sep, 2005
1 commit
-
Update RCU documentation based on discussions and review of RCU-based tree
patches. Add an introductory whatisRCU.txt file.Signed-off-by:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds