HomeFreeBSD

vfs: increment numvnodes without the vnode list lock unless under pressure

Description

vfs: increment numvnodes without the vnode list lock unless under pressure

The vnode list lock is only needed to reclaim free vnodes or kick the vnlru
thread (or to block and not miss a wake up (but note the sleep has a timeout so
this would not be a correctness issue)). Try to get away without the lock by
just doing an atomic increment.

The lock is contended e.g., during poudriere -j 104 where about half of all
acquires come from vnode allocation code.

Note the entire scheme needs a rewrite, the above just reduces it's SMP impact.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D23140

Details

Committed
mjgJan 16 2020, 9:45 PM
Reviewer
kib
Differential Revision
D23140: vfs: increment numvnodes without the vnode list lock unless under pressure
Parents
rS356811: vfs: refcator vnode allocation
Branches
Unknown
Tags
Unknown