HomeFreeBSD

locks: change backoff to exponential

Description

locks: change backoff to exponential

Previous implementation would use a random factor to spread readers and
reduce chances of starvation. This visibly reduces effectiveness of the
mechanism.

Switch to the more traditional exponential variant. Try to limit starvation
by imposing an upper limit of spins after which spinning is half of what
other threads get. Note the mechanism is turned off by default.

Reviewed by: kib (previous version)

Details

Provenance
mjgAuthored on Feb 7 2017, 2:49 PM
Parents
rG5267f6243d05: Add support for PLATFORM and PLATFORM_SMP to the Altera SOCFPGA SoC. This
Branches
Unknown
Tags
Unknown

Event Timeline