mirror_zfs/module
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
..
avl SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
icp SPDX: license tags: LicenseRef-OpenZFS-ThirdParty-PublicDomain 2025-03-13 17:57:31 -07:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
nvpair nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
os Implement allocation size ranges and use for gang leaves (#17111) 2025-05-02 15:32:18 -07:00
unicode SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcommon GCC 15: Fix unterminated-string-initialization (#17244) 2025-04-16 09:33:29 -07:00
zfs Implement allocation size ranges and use for gang leaves (#17111) 2025-05-02 15:32:18 -07:00
zstd SPDX: license tags: BSD-3-Clause OR GPL-2.0-only 2025-03-13 17:57:17 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
Makefile.bsd freebsd: unbreak module/Makefile.bsd build on 15-CURRENT-arm64 2025-04-05 19:43:41 -04:00
Makefile.in Fix "make install" with DESTDIR set (#16995) 2025-02-07 16:38:58 -08:00