locktorture: Support rwlocks

Add a "rw_lock" torture test to stress kernel rwlocks and their irq
variant. Reader critical regions are 5x longer than writers. As such
a similar ratio of lock acquisitions is seen in the statistics. In the
case of massive contention, both hold the lock for 1/10 of a second.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
Davidlohr Bueso
2014-09-29 06:14:23 -07:00
committed by Paul E. McKenney
parent dd56af42bd
commit e34191fad8
5 changed files with 125 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
LOCK01
LOCK02
LOCK03
LOCK04

View File

@@ -0,0 +1,6 @@
CONFIG_SMP=y
CONFIG_NR_CPUS=4
CONFIG_HOTPLUG_CPU=y
CONFIG_PREEMPT_NONE=n
CONFIG_PREEMPT_VOLUNTARY=n
CONFIG_PREEMPT=y

View File

@@ -0,0 +1 @@
locktorture.torture_type=rw_lock