summaryrefslogtreecommitdiffstats
path: root/Documentation/locking
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2014-09-12 00:40:41 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-16 16:41:07 -0400
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
29 ownership (writers). The default value is twice the number 29 ownership (writers). The default value is twice the number
30 of online CPUs. 30 of online CPUs.
31 31
32nreaders_stress Number of kernel threads that will stress shared lock
33 ownership (readers). The default is the same amount of writer
34 locks. If the user did not specify nwriters_stress, then
35 both readers and writers be the amount of online CPUs.
36
32torture_type Type of lock to torture. By default, only spinlocks will 37torture_type Type of lock to torture. By default, only spinlocks will
33 be tortured. This module can torture the following locks, 38 be tortured. This module can torture the following locks,
34 with string values as follows: 39 with string values as follows:
@@ -97,15 +102,18 @@ STATISTICS
97Statistics are printed in the following format: 102Statistics are printed in the following format:
98 103
99spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0 104spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0
100 (A) (B) (C) (D) 105 (A) (B) (C) (D) (E)
101 106
102(A): Lock type that is being tortured -- torture_type parameter. 107(A): Lock type that is being tortured -- torture_type parameter.
103 108
104(B): Number of times the lock was acquired. 109(B): Number of writer lock acquisitions. If dealing with a read/write primitive
110 a second "Reads" statistics line is printed.
111
112(C): Number of times the lock was acquired.
105 113
106(C): Min and max number of times threads failed to acquire the lock. 114(D): Min and max number of times threads failed to acquire the lock.
107 115
108(D): true/false values if there were errors acquiring the lock. This should 116(E): true/false values if there were errors acquiring the lock. This should
109 -only- be positive if there is a bug in the locking primitive's 117 -only- be positive if there is a bug in the locking primitive's
110 implementation. Otherwise a lock should never fail (i.e., spin_lock()). 118 implementation. Otherwise a lock should never fail (i.e., spin_lock()).
111 Of course, the same applies for (C), above. A dummy example of this is 119 Of course, the same applies for (C), above. A dummy example of this is