diff options
author | Alexander Motin <mav@FreeBSD.org> | 2022-07-05 23:27:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 23:27:29 +0000 |
commit | 74230a5bc1be6e5e84a5f41b26f6f65a155078f0 (patch) | |
tree | 4203db4b1a46a8ab4a900a6bdd893fd3d02c21de /module/zfs/dsl_destroy.c | |
parent | 1ac7d194e5ca31d5284e410a87ad9f9669a7f5b5 (diff) | |
download | src-74230a5bc1be6e5e84a5f41b26f6f65a155078f0.tar.gz src-74230a5bc1be6e5e84a5f41b26f6f65a155078f0.zip |
Avoid memory copy when verifying raidz/draid parity
Before this change for every valid parity column raidz_parity_verify()
allocated new buffer and copied there existing data, then recalculated
the parity and compared the result with the copy. This patch removes
the memory copy, simply swapping original buffer pointers with newly
allocated empty ones for parity recalculation and comparison. Original
buffers with potentially incorrect parity data are then just freed,
while new recalculated ones are used for repair.
On a pool of 12 4-wide raidz vdevs, storing 1.5TB of 16MB blocks, this
change reduces memory traffic during scrub by 17% and total unhalted
CPU time by 25%.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13613
Diffstat (limited to 'module/zfs/dsl_destroy.c')
0 files changed, 0 insertions, 0 deletions