[PATCH v2 0/4] test-ww_mutex: Miscellaneous fixes

Håkon Bugge posted 4 patches 1 week, 5 days ago
kernel/locking/test-ww_mutex.c | 68 +++++++++++++++++++++++++++-------
1 file changed, 54 insertions(+), 14 deletions(-)
[PATCH v2 0/4] test-ww_mutex: Miscellaneous fixes
Posted by Håkon Bugge 1 week, 5 days ago
This series fixes:
     - module cleanup
     - error propagation from stress workers
     - transient -EDEADLK handling in test_cycle_work()
     - timeout-related false negatives in stress_inorder_work()

The series is re-based on v7.2-rc2 and has been tested on a 96-CPU
x86_64 bare-metal system and a 160-CPU arm64 bare-metal system. Both
systems completed 100 iterations of
tools/testing/selftests/locking/ww_mutex.sh successfully with the
self-test as a module. With the self-test as a built-in, both systems
survived:

	for N in {1..100}; do
	    echo 1 > /sys/kernel/test_ww_mutex/run_tests
	done

The main differences between the original contribution and this v2, is
that the first patch retains the sysfs file when the test is built-in,
even in case of error (suggested by John Stultz). There is no change
in the second commit, except for John's a-b. In the third commit, the
endless spinning acquiring the mutex has been replaced by a modest
for-loop, which follows the WW big-rules wrt. contention.

The last patch has an improved commit message.

Håkon Bugge (4):
  test-ww_mutex: Fix module cleanup
  test-ww_mutex: Report errors from stress workers
  test-ww_mutex: Handle transient -EDEADLK in test_cycle_work
  test-ww_mutex: Retry lock acquisition after timeout if deadlocked

 kernel/locking/test-ww_mutex.c | 68 +++++++++++++++++++++++++++-------
 1 file changed, 54 insertions(+), 14 deletions(-)

--
2.43.5