mirror_zfs/lib
Paul Dagnelie 246e5883bb
Implement allocation size ranges and use for gang leaves (#17111)
When forced to resort to ganging, ZFS currently allocates three child
blocks, each one third of the size of the original. This is true
regardless of whether larger allocations could be made, which would
allow us to have fewer gang leaves. This improves performance when
fragmentation is high enough to require ganging, but not so high that
all the free ranges are only just big enough to hold a third of the
recordsize. This is also useful for improving the behavior of a future
change to allow larger gang headers.

We add the ability for the allocation codepath to allocate a range of
sizes instead of a single fixed size. We then use this to pre-allocate
the DVAs for the gang children. If those allocations fail, we fall back
to the normal write path, which will likely re-gang.

Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Co-authored-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2025-05-02 15:32:18 -07:00
..
libavl cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libefi SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libicp icp: remove skein module 2024-05-31 15:13:39 -07:00
libnvpair nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
libshare SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
libspl Support using llvm-libunwind 2025-04-24 13:58:48 -04:00
libtpool SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libunicode module: unicode: remove unused uconv.c 2024-11-01 12:12:13 -07:00
libuutil nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
libzdb Provide macros for setting and getting blkptr birth times 2024-03-25 15:01:54 -07:00
libzfs Implement allocation size ranges and use for gang leaves (#17111) 2025-05-02 15:32:18 -07:00
libzfs_core nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
libzfsbootenv nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
libzpool cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
libzstd libzstd: also build with LIBZPOOL_CPPFLAGS 2024-09-09 14:13:27 -07:00
libzutil SPDX: license tags: BSD-3-Clause 2025-03-13 17:56:50 -07:00
Makefile.am libzdb: Initial breakout of libzdb 2024-02-05 10:00:41 -08:00