]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sx: fix adaptive spinning broken in r327397
authormjg <mjg@FreeBSD.org>
Fri, 2 Mar 2018 21:26:27 +0000 (21:26 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 2 Mar 2018 21:26:27 +0000 (21:26 +0000)
commitdd76098f0607ff1d775f5e7d1731a1bea8d7b106
tree25ae5a46f526fa7a85e99fcf2720d6944cf1be61
parent2187556f65a69f0a3bde37af79c5cec0454c6b1f
sx: fix adaptive spinning broken in r327397

The condition was flipped.

In particular heavy multithreaded kernel builds on zfs started suffering
due to nested sx locks.

For instance make -s -j 128 buildkernel:

before: 3326.67s user 1269.62s system 6981% cpu 1:05.84 total
after: 3365.55s user 911.27s system 6871% cpu 1:02.24 total

ps.
      .-'---`-.       .-'---`-.
    ,'          `.     ,'          `.
    |             \     |             \
    |              \     |              \
    \           _  \     \           _  \
    ,\  _    ,'-,/-)\     ,\  _    ,'-,/-)\
    ( * \ \,' ,' ,'-)     ( * \ \,' ,' ,'-)
     `._,)     -',-')      `._,)     -',-')
       \/         ''/        \/         ''/
        )        / /         )        / /
       /       ,'-'        /       ,'-'
sys/kern/kern_sx.c