HomeFreeBSD

zfs: depessimize zfs_root with rmlocks

Description

zfs: depessimize zfs_root with rmlocks

Currently vfs calls the root method on each absolute lookup and when
crossing mount points.

zfs_root ends up looking up the inode internally as if it was not
instantianted which results in significant lock contention on systems
like EPYC.

Store the vnode in the mount point and protect the access with rmlocks.
This is a temporary hack for 12.0.

Sample result:

before:
make -s -j 128 buildkernel 2778.09s user 3319.45s system 8370% cpu 1:12.85 total

after:
make -s -j 128 buildkernel 3199.57s user 1772.78s system 8232% cpu 1:00.40 total

Tested by: pho (zfs mount/unmount tests)
Reviewed by: kib, mav, sef (different parts)
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17233

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D17233: zfs: depessimize zfs_root with rmlocks
Parents
rS338926: libevent: eliminate in-tree usage of arc4random_addrandom
Branches
Unknown
Tags
Unknown