Skip to contentSkip to conversation

RCU: add fake writers to rcutorture

PATCH Superseded Josh Triplett 1 participant 1 message Aug 19, 2006

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RCU: add fake writers to rcutorture

rcutorture currently has one writer and an arbitrary number of readers. To better exercise some of the code paths in RCU implementations, add fake writer threads which call the synchronize function for the RCU variant in a loop, with a delay between calls to arrange for different numbers of writers running in parallel.

---
 Documentation/RCU/torture.txt |    9 +++
 kernel/rcutorture.c           |  109 +++++++++++++++++++++++++++++++++++++++--
 2 files changed, 113 insertions(+), 5 deletions(-)
Documentation/RCU/torture.txt +9 -0
index 2174bad..2180ef9 100644
@@ -28,6 +28,15 @@ nreaders	This is the number of RCU readi
 		To properly exercise RCU implementations with preemptible
 		read-side critical sections.
 
+nfakewriters	This is the number of RCU fake writer threads to run.  Fake
+		writer threads repeatedly use the synchronous "wait for
+		current readers" function of the interface selected by
+		torture_type, with a delay between calls to allow for various
+		different numbers of writers running in parallel.
+		nfakewriters defaults to 4, which provides enough parallelism
+		to trigger special cases caused by multiple writers, such as
+		the synchronize_srcu() early return optimization.
+
 stat_interval	The number of seconds between output of torture
 		statistics (via printk()).  Regardless of the interval,
 		statistics are printed when the module is unloaded.
kernel/rcutorture.c +104 -5

205 lines not on this page · raw message