HomeFreeBSD

MFC r312890,r313386,r313390:

Description

MFC r312890,r313386,r313390:

Sprinkle __read_mostly on backoff and lock profiling code.

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.

locks: follow up r313386

Unfinished diff was committed by accident. The loop in lock_delay
was changed to decrement, but the loop iterator was still incrementing.

Details

Provenance
mjgAuthored on
Parents
rS315338: Add cavium octeon 'bootoctlinux' boot argument support
Branches
Unknown
Tags
Unknown