HomeFreeBSD

lockmgr: implement fast path

Description

lockmgr: implement fast path

The main lockmgr routine takes 8 arguments which makes it impossible to
tail-call it by the intermediate vop_stdlock/unlock routines.

The routine itself starts with an if-forest and reads from the lock itself
several times.

This slows things down both single- and multi-threaded. With the patch
single-threaded fstats go 4% up and multithreaded up to ~27%.

Note that there is still a lot of room for improvement.

Reviewed by: kib
Tested by: pho

Details

Provenance
mjgAuthored on
Reviewer
kib
Parents
rS313682: MFC r313273:
Branches
Unknown
Tags
Unknown