mirror_zfs/module
Alexander Motin 1ac7d194e5
Avoid memory copies during mirror scrub
Issuing several scrub reads for a block we may use the parent ZIO
buffer for one of child ZIOs.  If that read complete successfully,
then we won't need to copy the data explicitly.  If block has only
one copy (typical for root vdev, which is also a mirror inside),
then we never need to copy -- succeed or fail as-is.  Previous
code also copied data from buffer of every successfully completed
child ZIO, but that just does not make any sense.

On healthy N-wide mirror this saves all N+1 (or even more in case
of ditto blocks) memory copies for each scrubbed block, allowing
CPU to focus mostly on check-summing.  For other vdev types it
should save one memory copy per block copy at root vdev.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13606
2022-07-05 16:26:20 -07:00
..
avl AVL: Remove obsolete branching optimizations 2022-06-09 15:27:36 -07:00
icp Enable -Wwrite-strings 2022-06-29 14:08:54 -07:00
lua module: lua: ldo: fix pragma name 2022-06-29 14:08:59 -07:00
nvpair linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
os Re-fix -Wwrite-strings on FreeBSD 2022-06-30 11:31:09 -07:00
unicode linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
zcommon Enable -Wwrite-strings 2022-06-29 14:08:54 -07:00
zfs Avoid memory copies during mirror scrub 2022-07-05 16:26:20 -07:00
zstd Tiered early abort, zstd edition 2022-05-24 09:43:22 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add support for ARCH=um for x86 sub-architectures 2022-06-15 14:22:52 -07:00
Makefile.bsd Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00