diff options
author | Alexander Motin <mav@FreeBSD.org> | 2023-04-27 19:32:58 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2023-06-02 18:17:11 +0000 |
commit | c1b9dc735f5da39aa5b4387ae0c8cff4ba1fd3aa (patch) | |
tree | 287d4103ae91f06d65516c6b9b94b034994e7834 | |
parent | e271cd7a65459bac900c88c2ff92b67e8e35b41c (diff) | |
download | src-c1b9dc735f5da39aa5b4387ae0c8cff4ba1fd3aa.tar.gz src-c1b9dc735f5da39aa5b4387ae0c8cff4ba1fd3aa.zip |
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 <behlendorf1@llnl.gov>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14798
-rw-r--r-- | module/zfs/zil.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c index aaf509a2fc73..0456d3801f25 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -2848,7 +2848,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; |