HomeFreeBSD

ZIL: Avoid dbuf_read() before dmu_sync().

Description

ZIL: Avoid dbuf_read() before dmu_sync().

In most cases dmu_sync() works with dirty records directly and does
not need actual data. The only exception is dmu_sync_late_arrival().
To save some CPU time use dmu_buf_hold_noread*() in z*_get_data()
and explicitly call dbuf_read() in dmu_sync_late_arrival(). There
is also a chance that by that time TXG will already be synced and
we won't have to do it at all.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15153

Details

Provenance
mavAuthored on Aug 11 2023, 4:04 PM
GitHub <noreply@github.com>Committed on Aug 11 2023, 4:04 PM
Parents
rG8ce2eba9e6a3: Linux 6.5 compat: Use copy_splice_read instead of filemap_splice_read
Branches
Unknown
Tags
Unknown