mirror_zfs/module/os/freebsd/zfs
Matthew Ahrens e2af2acce3
allow callers to allocate and provide the abd_t struct
The `abd_get_offset_*()` routines create an abd_t that references
another abd_t, and doesn't allocate any pages/buffers of its own.  In
some workloads, these routines may be called frequently, to create many
abd_t's representing small pieces of a single large abd_t.  In
particular, the upcoming RAIDZ Expansion project makes heavy use of
these routines.

This commit adds the ability for the caller to allocate and provide the
abd_t struct to a variant of `abd_get_offset_*()`.  This eliminates the
cost of allocating the abd_t and performing the accounting associated
with it (`abdstat_struct_size`).  The RAIDZ/DRAID code uses this for
the `rc_abd`, which references the zio's abd.  The upcoming RAIDZ
Expansion project will leverage this infrastructure to increase
performance of reads post-expansion by around 50%.

Additionally, some of the interfaces around creating and destroying
abd_t's are cleaned up.  Most significantly, the distinction between
`abd_put()` and `abd_free()` is eliminated; all types of abd_t's are
now disposed of with `abd_free()`.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Issue #8853 
Closes #11439
2021-01-20 11:24:37 -08:00
..
abd_os.c allow callers to allocate and provide the abd_t struct 2021-01-20 11:24:37 -08:00
arc_os.c Implement memory and CPU hotplug 2020-12-10 14:09:23 -08:00
crypto_os.c Fix crypto build on FreeBSD HEAD 2020-05-30 12:54:57 -07:00
dmu_os.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
hkdf.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
kmod_core.c FreeBSD: Sort and dedup includes in kmod_core 2020-10-08 09:37:56 -07:00
spa_os.c FreeBSD: Add option to rewind checkpoint while importing root pool 2020-08-19 17:19:42 -07:00
sysctl_os.c FreeBSD: Fix format of vfs.zfs.arc_no_grow_shift 2020-12-10 15:28:56 -08:00
vdev_file.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
vdev_geom.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
vdev_label_os.c Add support for boot environment data to be stored in the label 2020-05-07 09:36:33 -07:00
zfs_acl.c Cross-platform acltype 2020-10-13 21:25:48 -07:00
zfs_ctldir.c FreeBSD: add missing fplookup_vexec handler to special vop vectors 2020-10-15 14:49:06 -07:00
zfs_debug.c Convert Linux-isms to FreeBSD-isms in platform zfs_debug.c 2020-07-31 21:25:35 -07:00
zfs_dir.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_file_os.c FreeBSD: Prevent NULL pointer dereference of resid 2020-11-04 16:50:08 -08:00
zfs_ioctl_compat.c FreeBSD: Fix legacy compat for platform IOCs 2020-09-30 13:25:50 -07:00
zfs_ioctl_os.c Make zc_nvlist_src_size limit tunable 2020-08-18 09:33:55 -07:00
zfs_vfsops.c zfs_vnops: make zfs_get_data OS-independent 2020-11-02 12:07:07 -08:00
zfs_vnops_os.c Remove redundant oid parameter to update_pages 2020-11-10 10:54:30 -08:00
zfs_znode.c G/C struct znode -> z_moved 2020-11-10 12:42:47 -08:00
zio_crypt.c Fix raw sends on encrypted datasets when copying back snapshots 2020-12-04 14:34:29 -08:00
zvol_os.c Fix problems in zvol_set_volmode_impl 2020-11-17 09:50:52 -08:00