HomeFreeBSD

vfs: add VOP_NEED_INACTIVE

Description

vfs: add VOP_NEED_INACTIVE

vnode usecount drops to 0 all the time (e.g. for directories during path lookup).
When that happens the kernel would always lock the exclusive lock for the vnode
in order to call vinactive(). This blocks other threads who want to use the vnode
for looukp.

vinactive is very rarely needed and can be tested for without the vnode lock held.

This patch gives filesytems an opportunity to do it, sample total wait time for
tmpfs over 500 minutes of poudriere -j 104:

before: 557563641706 (lockmgr:tmpfs)
after: 46309603301 (lockmgr:tmpfs)

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21371

Details

Provenance
mjgAuthored on
Differential Revision
D21371: vfs: add VOP_NEED_INACTIVE
Parents
rS351583: MFC r350677: Make GCC happy about math in r350676.
Branches
Unknown
Tags
Unknown