8d103d8856
Authored by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Robert Mustacchi <rm@joyent.com> Ported-by: Don Brady <don.brady@delphix.com> Every time we want to unmount a snapshot (happens during snapshot deletion or renaming) we unnecessarily iterate through all the mountpoints in the VFS layer (see zfs_get_vfs). The current patch completely gets rid of that code and changes the approach while keeping the behavior of that code path the same. Specifically, it puts a hold on the dataset/snapshot and gets its vfs resource reference directly, instead of linearly searching for it. If that reference exists we attempt to amount it. With the above change, it became obvious that the nvlist manipulations that we do (add_boolean and add_nvlist) take a significant amount of time ensuring uniqueness of every new element even though they don't have too. Thus, we updated the patch so those nvlists are not trying to enforce the uniqueness of their elements. A more complete analysis of the problem solved by this patch can be found below: https://sdimitro.github.io/post/snap-unmount-perf/ OpenZFS-issue: https://www.illumos.org/issues/8604 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/126118fb |
||
---|---|---|
.. | ||
crypto | ||
fm | ||
fs | ||
lua | ||
sysevent | ||
abd.h | ||
arc_impl.h | ||
arc.h | ||
avl_impl.h | ||
avl.h | ||
blkptr.h | ||
bplist.h | ||
bpobj.h | ||
bptree.h | ||
bqueue.h | ||
dbuf.h | ||
ddt.h | ||
dmu_impl.h | ||
dmu_objset.h | ||
dmu_send.h | ||
dmu_traverse.h | ||
dmu_tx.h | ||
dmu_zfetch.h | ||
dmu.h | ||
dnode.h | ||
dsl_bookmark.h | ||
dsl_crypt.h | ||
dsl_dataset.h | ||
dsl_deadlist.h | ||
dsl_deleg.h | ||
dsl_destroy.h | ||
dsl_dir.h | ||
dsl_pool.h | ||
dsl_prop.h | ||
dsl_scan.h | ||
dsl_synctask.h | ||
dsl_userhold.h | ||
edonr.h | ||
efi_partition.h | ||
frame.h | ||
hkdf.h | ||
Makefile.am | ||
metaslab_impl.h | ||
metaslab.h | ||
mmp.h | ||
mntent.h | ||
multilist.h | ||
nvpair_impl.h | ||
nvpair.h | ||
pathname.h | ||
policy.h | ||
range_tree.h | ||
refcount.h | ||
rrwlock.h | ||
sa_impl.h | ||
sa.h | ||
sdt.h | ||
sha2.h | ||
skein.h | ||
spa_boot.h | ||
spa_checksum.h | ||
spa_impl.h | ||
spa.h | ||
space_map.h | ||
space_reftree.h | ||
sysevent.h | ||
trace_acl.h | ||
trace_arc.h | ||
trace_common.h | ||
trace_dbgmsg.h | ||
trace_dbuf.h | ||
trace_dmu.h | ||
trace_dnode.h | ||
trace_multilist.h | ||
trace_txg.h | ||
trace_zil.h | ||
trace_zio.h | ||
trace_zrlock.h | ||
trace.h | ||
txg_impl.h | ||
txg.h | ||
u8_textprep_data.h | ||
u8_textprep.h | ||
uberblock_impl.h | ||
uberblock.h | ||
uio_impl.h | ||
unique.h | ||
uuid.h | ||
vdev_disk.h | ||
vdev_file.h | ||
vdev_impl.h | ||
vdev_raidz_impl.h | ||
vdev_raidz.h | ||
vdev.h | ||
xvattr.h | ||
zap_impl.h | ||
zap_leaf.h | ||
zap.h | ||
zcp_global.h | ||
zcp_iter.h | ||
zcp_prop.h | ||
zcp.h | ||
zfeature.h | ||
zfs_acl.h | ||
zfs_context.h | ||
zfs_ctldir.h | ||
zfs_debug.h | ||
zfs_delay.h | ||
zfs_dir.h | ||
zfs_fuid.h | ||
zfs_ioctl.h | ||
zfs_onexit.h | ||
zfs_ratelimit.h | ||
zfs_rlock.h | ||
zfs_sa.h | ||
zfs_stat.h | ||
zfs_vfsops.h | ||
zfs_vnops.h | ||
zfs_znode.h | ||
zil_impl.h | ||
zil.h | ||
zio_checksum.h | ||
zio_compress.h | ||
zio_crypt.h | ||
zio_impl.h | ||
zio_priority.h | ||
zio.h | ||
zpl.h | ||
zrlock.h | ||
zvol.h |