diff options
author | Alexander Motin <[email protected]> | 2023-10-11 19:37:21 -0400 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2023-11-08 12:15:41 -0800 |
commit | e82e68400a5be0e82d10044d4f70ebaed1547cb9 (patch) | |
tree | 96f15d9aa560c1b29e7c93db407ca1272b544d73 /module/os | |
parent | 3f67e012e4507527f9d8aae6c93efbe5660556d3 (diff) |
DMU: Do not pre-read holes during write
dmu_tx_check_ioerr() pre-reads blocks that are going to be dirtied
as part of transaction to both prefetch them and check for errors.
But it makes no sense to do it for holes, since there are no disk
reads to prefetch and there can be no errors. On the other side
those blocks are anonymous, and they are freed immediately by the
dbuf_rele() without even being put into dbuf cache, so we just
burn CPU time on decompression and overheads and get absolutely
no result at the end.
Use of dbuf_hold_impl() with fail_sparse parameter allows to skip
the extra work, and on my tests with sequential 8KB writes to empty
ZVOL with 32KB blocks shows throughput increase from 1.7 to 2GB/s.
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #15371
Diffstat (limited to 'module/os')
0 files changed, 0 insertions, 0 deletions