]> git.baikalelectronics.ru Git - kernel.git/commit
locktorture: Support mutexes
authorDavidlohr Bueso <dave@stgolabs.net>
Fri, 12 Sep 2014 03:40:18 +0000 (20:40 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 16 Sep 2014 20:40:59 +0000 (13:40 -0700)
commite75de9ae6e6677193959b24db24f9dfbe88f6c67
tree4fe354b785d0d575bcd47af7dc8d9edb299f78f7
parent98606daf7eea6b3b332d0a5265edef9501b2cc96
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>
Documentation/locking/locktorture.txt
kernel/locking/locktorture.c