summaryrefslogtreecommitdiffstats
path: root/Documentation/locking
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2014-09-11 20:40:18 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-16 13:40:59 -0700
commit42ddc75ddd478edac6ad9dc8c63abb4441541af2 (patch)
tree4fe354b785d0d575bcd47af7dc8d9edb299f78f7 /Documentation/locking
parentcdf26bb10bcb50161d452b16eb3cf2901645d625 (diff)
downloadop-kernel-dev-42ddc75ddd478edac6ad9dc8c63abb4441541af2.zip
op-kernel-dev-42ddc75ddd478edac6ad9dc8c63abb4441541af2.tar.gz
locktorture: Support mutexes
Add a "mutex_lock" torture test. The main difference with the already existing spinlock tests is that the latency of the critical region is much larger. We randomly delay for (arbitrarily) either 500 ms or, otherwise, 25 ms. While this can considerably reduce the amount of writes compared to non blocking locks, if run long enough it can have the same torturous effect. Furthermore it is more representative of mutex hold times and can stress better things like thrashing. 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.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/locking/locktorture.txt b/Documentation/locking/locktorture.txt
index 3eb9b81..f2a905b 100644
--- a/Documentation/locking/locktorture.txt
+++ b/Documentation/locking/locktorture.txt
@@ -40,6 +40,8 @@ torture_type Type of lock to torture. By default, only spinlocks will
o "spin_lock_irq": spin_lock_irq() and spin_unlock_irq()
pairs.
+ o "mutex_lock": mutex_lock() and mutex_unlock() pairs.
+
torture_runnable Start locktorture at boot time in the case where the
module is built into the kernel, otherwise wait for
torture_runnable to be set via sysfs before starting.
OpenPOWER on IntegriCloud