diff options
author | lidongyang <[email protected]> | 2017-12-23 05:19:51 +1100 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-01-30 10:27:31 -0600 |
commit | 8d82a19def540bba43c8c7597142ff53f7a0b7e5 (patch) | |
tree | 7e8c14ea864a460cb3ac84e3639b332b5d124120 /module | |
parent | c2aacf20872856559972a27f7c3f9b4a6fe10cd2 (diff) |
Call commit callbacks from the tail of the list
Our zfs backed Lustre MDT had soft lockups while under heavy metadata
workloads while handling transaction callbacks from osd_zfs.
The problem is zfs is not taking advantage of the fast path in
Lustre's trans callback handling, where Lustre will skip the calls
to ptlrpc_commit_replies() when it already saw a higher transaction
number.
This patch corrects this, it also has a positive impact on metadata
performance on Lustre with osd_zfs, plus some cleanup in the headers.
A similar issue for ext4/ldiskfs is described on:
https://jira.hpdd.intel.com/browse/LU-6527
Reviewed-by: Olaf Faaland <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Li Dongyang <[email protected]>
Closes #6986
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dmu_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 097fa774a..c3cc03a69 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -1200,7 +1200,7 @@ dmu_tx_do_callbacks(list_t *cb_list, int error) { dmu_tx_callback_t *dcb; - while ((dcb = list_head(cb_list)) != NULL) { + while ((dcb = list_tail(cb_list)) != NULL) { list_remove(cb_list, dcb); dcb->dcb_func(dcb->dcb_data, error); kmem_free(dcb, sizeof (dmu_tx_callback_t)); |