aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2023-04-27 15:32:58 -0400
committerGitHub <[email protected]>2023-04-27 12:32:58 -0700
commit2fd1c30423620a5b198ac1a5aa2cff8e1e57b7f3 (patch)
tree294badf13365142055efee91cacd9f08274b4bd8
parentae0d0f0e047edc0da20f9dcf28d161e31a259751 (diff)
Mark TX_COMMIT transaction with TXG_NOTHROTTLE.
TX_COMMIT has no on-disk representation and does not produce any more dirty data. It should not wait for anything, and even just skipping the checks if not waiting gives improvement noticeable in profiler. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Prakash Surya <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #14798
-rw-r--r--module/zfs/zil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
index d1631c2ac..ec9da706a 100644
--- a/module/zfs/zil.c
+++ b/module/zfs/zil.c
@@ -3155,7 +3155,14 @@ static void
zil_commit_itx_assign(zilog_t *zilog, zil_commit_waiter_t *zcw)
{
dmu_tx_t *tx = dmu_tx_create(zilog->zl_os);
- VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
+
+ /*
+ * Since we are not going to create any new dirty data, and we
+ * can even help with clearing the existing dirty data, we
+ * should not be subject to the dirty data based delays. We
+ * use TXG_NOTHROTTLE to bypass the delay mechanism.
+ */
+ VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE));
itx_t *itx = zil_itx_create(TX_COMMIT, sizeof (lr_t));
itx->itx_sync = B_TRUE;