]> Git Repo - linux.git/commit - lib/test_lockup.c
lib/test_lockup.c: add parameters for locking generic vfs locks
authorKonstantin Khlebnikov <[email protected]>
Tue, 7 Apr 2020 03:09:54 +0000 (20:09 -0700)
committerLinus Torvalds <[email protected]>
Tue, 7 Apr 2020 17:43:42 +0000 (10:43 -0700)
commitaecd42df6d399346fd8e5551dd8878338f214ec1
treed77698dcf4a8068be1dfe22d7b2504e80a7631ec
parentad3f434b87e7d2be4f2f5d602d33f070823f4d48
lib/test_lockup.c: add parameters for locking generic vfs locks

file_path=<path> defines file or directory to open
lock_inode=Y set lock_rwsem_ptr to inode->i_rwsem
lock_mapping=Y set lock_rwsem_ptr to mapping->i_mmap_rwsem
lock_sb_umount=Y set lock_rwsem_ptr to sb->s_umount

This gives safe and simple way to see how system reacts to contention of
common vfs locks and how syscalls depend on them directly or indirectly.

For example to block s_umount for 60 seconds:
# modprobe test_lockup file_path=. lock_sb_umount time_secs=60 state=S

This is useful for checking/testing scalability issues like this:
https://lore.kernel.org/lkml/158497590858.7371.9311902565121473436.stgit@buzz/

Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/158498153964.5621.83061779039255681.stgit@buzz
Signed-off-by: Linus Torvalds <[email protected]>
lib/test_lockup.c
This page took 0.04889 seconds and 4 git commands to generate.