rm -rf /var/foo
fsstress -d /var/foo -l 0 -n 10000 -p 50 &
for i in {1..15}; do sleep 60; time sync; done
fsstress does some sync(2)s and these will sometimes become ensnared
in the VI_TRYLOCK spin. This is not a serious performance test and the
time sync is not a great measurement but it does show occasional
delays. a/b here are before/after patch:
$ ministat a b
x a
+ b
+------------------------------------------------------------------------------+
| ++ |
| ++ ++ x |
| +**+*x+** x + x x x x x x x|
||_|_MA__|__M_________A____________________| |
+------------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 15 0.075 1.38 0.239 0.40873333 0.3664479
+ 15 0.057 0.26 0.113 0.12513333 0.055064724