HomeFreeBSD

ZIL: Reduce scope of per-dataset zl_issuer_lock.

Description

ZIL: Reduce scope of per-dataset zl_issuer_lock.

Before this change ZIL copied all log data while holding the lock.
It caused huge lock contention on workloads with many big parallel
writes. This change splits the process into two parts: first,
zil_lwb_assign() estimates the log space needed for all transactions,
and zil_lwb_write_close() allocates blocks and zios while holding the
lock, then, after the lock in dropped, zil_lwb_commit() copies the
data, and zil_lwb_write_issue() issues the I/Os.

Also while there slightly reduce scope of zl_lock.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14841

Details

Provenance
mavAuthored on May 25 2023, 4:48 PM
GitHub <noreply@github.com>Committed on May 25 2023, 4:48 PM
Parents
rG79b20949b25c: systemd: Use non-absolute paths in Exec* lines
Branches
Unknown
Tags
Unknown