diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-12-19 20:03:17 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-12-19 20:03:17 -0500 |
commit | 3013683253ad04f67d8cfaa25be708353686b90a (patch) | |
tree | eadc35b70c0169096a7dbaf4eb9966be7630db04 /fs/xfs/xfs_trans_priv.h | |
parent | c90821a26a8c90ad1e3116393b8a8260ab46bffb (diff) |
xfs: remove all the inodes on a buffer from the AIL in bulk
When inode buffer IO completes, usually all of the inodes are removed from the
AIL. This involves processing them one at a time and taking the AIL lock once
for every inode. When all CPUs are processing inode IO completions, this causes
excessive amount sof contention on the AIL lock.
Instead, change the way we process inode IO completion in the buffer
IO done callback. Allow the inode IO done callback to walk the list
of IO done callbacks and pull all the inodes off the buffer in one
go and then process them as a batch.
Once all the inodes for removal are collected, take the AIL lock
once and do a bulk removal operation to minimise traffic on the AIL
lock.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_trans_priv.h')
-rw-r--r-- | fs/xfs/xfs_trans_priv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h index e039729186e9..246ca4dcb5c4 100644 --- a/fs/xfs/xfs_trans_priv.h +++ b/fs/xfs/xfs_trans_priv.h | |||
@@ -85,6 +85,10 @@ void xfs_trans_ail_update_bulk(struct xfs_ail *ailp, | |||
85 | void xfs_trans_ail_delete(struct xfs_ail *ailp, | 85 | void xfs_trans_ail_delete(struct xfs_ail *ailp, |
86 | struct xfs_log_item *lip) | 86 | struct xfs_log_item *lip) |
87 | __releases(ailp->xa_lock); | 87 | __releases(ailp->xa_lock); |
88 | void xfs_trans_ail_delete_bulk(struct xfs_ail *ailp, | ||
89 | struct xfs_log_item **log_items, | ||
90 | int nr_items) | ||
91 | __releases(ailp->xa_lock); | ||
88 | void xfs_trans_ail_push(struct xfs_ail *, xfs_lsn_t); | 92 | void xfs_trans_ail_push(struct xfs_ail *, xfs_lsn_t); |
89 | void xfs_trans_unlocked_item(struct xfs_ail *, | 93 | void xfs_trans_unlocked_item(struct xfs_ail *, |
90 | xfs_log_item_t *); | 94 | xfs_log_item_t *); |