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 Feb 12 2017, 9:49 AM
Parents
rGad68ac431b39: Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu
Branches
Unknown
Tags
Unknown

Event Timeline