freebsd-dev/sys/cddl
Mateusz Guzik af534f8d99 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
2018-09-25 17:58:06 +00:00
..
boot/zfs Mark two things as unused (since they are only sometimes used) and 2017-12-03 04:55:33 +00:00
compat/opensolaris MFV/ZoL: add dbuf stats 2018-08-12 01:10:18 +00:00
contrib/opensolaris zfs: depessimize zfs_root with rmlocks 2018-09-25 17:58:06 +00:00
dev Add support for 'C'-compressed ISA extension to DTrace FBT provider. 2018-09-03 14:34:09 +00:00