1 The synchro-test.ko module can be used for testing and benchmarking mutexes,
2 semaphores and R/W semaphores.
4 The module is compiled by setting CONFIG_DEBUG_SYNCHRO_TEST to "m" when
5 configuring the kernel.
9 insmod synchro-test.ko <args>
11 It will exit with error ENOANO after running the tests and printing the
12 results to the kernel console log.
14 The available arguments are:
18 Start up to N mutex thrashing threads, where N is at most 20. All will
19 try and thrash the same mutex.
23 Start up to N counting semaphore thrashing threads, where N is at most
24 20. All will try and thrash the same semaphore.
28 Initialise the counting semaphore with M, where M is any positive
29 integer greater than zero. The default is 4.
35 Start up to N reader thrashing threads, O writer thrashing threads and
36 P downgrader thrashing threads, where N, O and P are at most 20
37 apiece. All will try and thrash the same read/write semaphore.
41 Run the tests for N seconds. The default is 5.
45 Each thread delays for N uS whilst holding the lock. The default is 0.
49 Each thread delays for N uS whilst not holding the lock. The default
54 Each thread will call schedule if required after each iteration.
58 Print more verbose information, including a thread iteration