[PATCH 1/4] xfs: do not update xa_last_pushed_lsn for locked items

Christoph Hellwig
2011-10-06T18:35:52Z

[-- Attachment #1: xfs-ail-retry-locked-items --]
[-- Type: text/plain, Size: 1021 bytes --]

If an item was locked we should not update xa_last_pushed_lsn and thus skip
it when restarting the AIL scan as we need to be able to lock and write it
out as soon as possible. Otherwise heavy lock contention might starve AIL
pushing too easily, especially given the larger backoff once we moved
xa_last_pushed_lsn all the way to the target lsn.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Tested-by: Stefan Priebe <s.priebe@profihost.ag>

Index: xfs/fs/xfs/xfs_trans_ail.c
===================================================================
--- xfs.orig/fs/xfs/xfs_trans_ail.c 2011-10-06 10:31:29.855243550 -0400
+++ xfs/fs/xfs/xfs_trans_ail.c 2011-10-06 10:31:55.832744112 -0400
@@ -452,7 +452,6 @@ xfs_ail_worker(

case XFS_ITEM_LOCKED:
XFS_STATS_INC(xs_push_ail_locked);
- ailp->xa_last_pushed_lsn = lsn;
stuck++;
break;