HomeFreeBSD

lockmgr: add adaptive spinning

Description

lockmgr: add adaptive spinning

It is very conservative. Only spinning when LK_ADAPTIVE is passed, only on
exclusive lock and never when any waiters are present. buffer cache is remains
not spinning.

This reduces total sleep times during buildworld etc., but it does not shorten
total real time (culprits are contention in the vm subsystem along with slock +
upgrade which is not covered).

For microbenchmarks: open3_processes -t 52 (open/close of the same file for
writing) ops/s:
before: 258845
after: 801638

Reviewed by: kib
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25753

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D25753: lockmgr: add adaptive spinning
Parents
rS363414: MFC r363141:
Branches
Unknown
Tags
Unknown