mirror_zfs/include
Matthew Ahrens 325d288c5d Add fast path for zfs_ioc_space_snaps() handling of empty_bpobj
When there are many snapshots, calls to zfs_ioc_space_snaps() (e.g. from
`zfs destroy -nv pool/fs@snap1%snap10000`) can be very slow, resulting
in poor performance because we are holding the dp_config_rwlock the
entire time, blocking spa_sync() from continuing.  With around ten
thousand snapshots, we've seen up to 500 seconds in this ioctl,
iterating over up to 50,000,000 bpobjs, ~99% of which are the empty
bpobj.

By creating a fast path for zfs_ioc_space_snaps() handling of the
empty_bpobj, we can achieve a ~5x performance improvement of this ioctl
(when there are many snapshots, and the deadlist is mostly
empty_bpobj's).

Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
External-issue: DLPX-58348
Closes #8744
2019-08-20 11:34:52 -07:00
..
linux Fix CONFIG_X86_DEBUG_FPU build failure 2019-07-17 09:14:36 -07:00
spl Drop KMC_NOEMERGENCY 2019-08-13 07:46:12 -06:00
sys Add fast path for zfs_ioc_space_snaps() handling of empty_bpobj 2019-08-20 11:34:52 -07:00
.gitignore Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
libnvpair.h Add JSON output support to channel programs 2018-03-19 12:40:58 -07:00
libuutil_common.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil.h Correct cppcheck errors 2017-09-19 12:17:29 -07:00
libzfs_core.h Remove code for zfs remap 2019-06-24 16:44:01 -07:00
libzfs_impl.h OpenZFS 8115 - parallel zfs mount 2018-11-15 11:33:58 -08:00
libzfs.h Race condition between spa async threads and export 2019-07-18 13:02:33 -07:00
libzutil.h Fix libudev dependency in libzutil 2018-11-06 17:47:52 -08:00
Makefile.am Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
thread_pool.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zfeature_common.h Fast Clone Deletion 2019-07-26 10:54:14 -07:00
zfs_comutil.h OpenZFS 9337 - zfs get all is slow due to uncached metadata 2018-07-12 10:49:27 -07:00
zfs_deleg.h Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher.h DLPX-44812 integrate EP-220 large memory scalability 2016-11-29 14:34:27 -08:00
zfs_namecheck.h Restrict filesystem creation if name referred either '.' or '..' 2019-06-13 08:56:15 -07:00
zfs_prop.h Add zfs module feature and property info to sysfs 2018-09-02 12:09:53 -07:00