aboutsummaryrefslogtreecommitdiff
path: root/Documentation/locking
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2014-09-11 21:40:41 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-16 13:41:07 -0700
commit4f6332c1dce9c64ef6bf93842067250dd850e482 (patch)
treec1282b207d116fdb56acb3782e9e59e05c7214df /Documentation/locking
parentd36a7a0d5e8b5bff1671723d733eb61621b0cee4 (diff)
locktorture: Add infrastructure for torturing read locks
Most of it is based on what we already have for writers. This allows readers to be very independent (and thus configurable), enabling future module parameters to control things such as rw distribution. Furthermore, readers have their own delaying function, allowing us to test different rw critical region latencies, and stress locking internals. Similarly, statistics, for now will only serve for the number of lock acquisitions -- as opposed to writers, readers have no failure detection. In addition, introduce a new nreaders_stress module parameter. The default number of readers will be the same number of writers threads. Writer threads are interleaved with readers. Documentation is updated, respectively. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/locking')
-rw-r--r--Documentation/locking/locktorture.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/Documentation/locking/locktorture.txt b/Documentation/locking/locktorture.txt
index f2a905b27862..7a72621b924f 100644
--- a/Documentation/locking/locktorture.txt
+++ b/Documentation/locking/locktorture.txt
@@ -29,6 +29,11 @@ nwriters_stress Number of kernel threads that will stress exclusive lock
ownership (writers). The default value is twice the number
of online CPUs.
+nreaders_stress Number of kernel threads that will stress shared lock
+ ownership (readers). The default is the same amount of writer
+ locks. If the user did not specify nwriters_stress, then
+ both readers and writers be the amount of online CPUs.
+
torture_type Type of lock to torture. By default, only spinlocks will
be tortured. This module can torture the following locks,
with string values as follows:
@@ -97,15 +102,18 @@ STATISTICS
Statistics are printed in the following format:
spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0
- (A) (B) (C) (D)
+ (A) (B) (C) (D) (E)
(A): Lock type that is being tortured -- torture_type parameter.
-(B): Number of times the lock was acquired.
+(B): Number of writer lock acquisitions. If dealing with a read/write primitive
+ a second "Reads" statistics line is printed.
+
+(C): Number of times the lock was acquired.
-(C): Min and max number of times threads failed to acquire the lock.
+(D): Min and max number of times threads failed to acquire the lock.
-(D): true/false values if there were errors acquiring the lock. This should
+(E): true/false values if there were errors acquiring the lock. This should
-only- be positive if there is a bug in the locking primitive's
implementation. Otherwise a lock should never fail (i.e., spin_lock()).
Of course, the same applies for (C), above. A dummy example of this is