Skip to content

Commit 7ef55c4

Browse files
committed
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 openzfs#14798
1 parent 38da653 commit 7ef55c4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

module/zfs/zil.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,14 @@ static void
28482848
zil_commit_itx_assign(zilog_t *zilog, zil_commit_waiter_t *zcw)
28492849
{
28502850
dmu_tx_t *tx = dmu_tx_create(zilog->zl_os);
2851-
VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
2851+
2852+
/*
2853+
* Since we are not going to create any new dirty data, and we
2854+
* can even help with clearing the existing dirty data, we
2855+
* should not be subject to the dirty data based delays. We
2856+
* use TXG_NOTHROTTLE to bypass the delay mechanism.
2857+
*/
2858+
VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE));
28522859

28532860
itx_t *itx = zil_itx_create(TX_COMMIT, sizeof (lr_t));
28542861
itx->itx_sync = B_TRUE;

0 commit comments

Comments
 (0)