zfs/include
Rob Norris 98bcc390e8 vdev_disk: rework bio max segment calculation
A single "page" in an ABD does not necessarily correspond to one segment
in a bio, because of how ZFS does ABD allocations and how it breaks them
up with adding them to a bio. Because of this, simply dividing the ABD
size by the page size can only ever give a minimum number of segments
required, rather than the correct number.

Until we can fix that, we'll just make each bio as large as they can be
for as many segments as the device queue will permit without needing to
split the the bio. This is a little wasteful if we don't intend to put
that many segments in the bio, but its not a lot of memory and its only
lost until the bio is completed.

This also adds a tuneable, vdev_disk_max_segs, to allow setting this
value to be set by the operator. This is very useful for debugging.

Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
(cherry picked from commit a3a438d1bedb0626417cd73ba10b1479a06bef7f)
2023-07-31 15:05:56 +00:00
..
os vdev_disk: rework bio max segment calculation 2023-07-31 15:05:56 +00:00
sys compress: add "slack" compression options 2023-07-05 13:27:31 +00:00
.gitignore OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
Makefile.am zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
cityhash.h Compile cityhash code into libzfs 2020-03-27 09:11:22 -07:00
libnvpair.h Add JSON output support to channel programs 2018-03-19 12:40:58 -07:00
libuutil.h Correct cppcheck errors 2017-09-19 12:17:29 -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
libzfs.h zpool: Provide GUID to zpool-reguid(8) with -g 2023-07-05 13:27:31 +00:00
libzfs_core.h zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
libzfs_impl.h zfs: support force exporting pools 2023-07-05 13:27:30 +00:00
libzfsbootenv.h zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
libzutil.h Rescan enclosure sysfs path on import 2021-11-02 16:31:05 -07:00
thread_pool.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zfeature_common.h compress: add "slack" compression options 2023-07-05 13:27:31 +00:00
zfs_comutil.h Fix "zpool add -n" for dedup, special and log devices 2020-01-06 15:40:06 -08:00
zfs_deleg.h Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher.h Add AVX512BW variant of fletcher 2019-10-30 12:26:14 -07:00
zfs_namecheck.h Implement bookmark copying 2020-02-11 13:19:12 -08:00
zfs_prop.h Add zfs module feature and property info to sysfs 2018-09-02 12:09:53 -07:00