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: NDavidlohr Bueso <dbueso@suse.de> Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录