From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Cc: Brian Foster <bfoster@redhat.com>
Subject: [RFC PATCH v3 1/2] xfs: re-enable xfsaild idle mode when the ail is empty
Date: Tue, 22 May 2012 12:38:33 -0400 [thread overview]
Message-ID: <1337704714-50235-2-git-send-email-bfoster@redhat.com> (raw)
In-Reply-To: <1337704714-50235-1-git-send-email-bfoster@redhat.com>
Running xfstests 273 in a loop on older kernels with xfsaild idle
mode support reproduces a lockup due to xfsaild entering idle mode
indefinitely. The following high-level sequence of events leads to
the hang:
- xfsaild is running, hits the stuck item threshold and reschedules,
setting xa_last_pushed_lsn appropriately.
- xa_threshold is updated.
- xfsaild restarts from the previous xa_last_pushed_lsn, hits the
new target and enters idle mode, even though the previously
stuck items still populate the ail.
Modify the tout logic to only enter idle mode when the ail is empty.
IOW, if we hit the target but did not perform the current scan from
the start of the ail, reschedule at least one more time.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_trans_ail.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 9c51448..8a122d3 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -488,7 +488,10 @@ out_done:
* longer for I/O to complete and remove pushed items from the
* AIL before we start the next scan from the start of the AIL.
*/
- tout = 50;
+ if (!count && !ailp->xa_last_pushed_lsn)
+ tout = 0;
+ else
+ tout = 50;
ailp->xa_last_pushed_lsn = 0;
} else if (((stuck + flushing) * 100) / count > 90) {
/*
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-05-22 16:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 16:38 [RFC PATCH v3 0/2] xfs: fix xfsaild races and re-enable idle mode Brian Foster
2012-05-22 16:38 ` Brian Foster [this message]
2012-05-22 16:38 ` [RFC PATCH v3 2/2] xfs: fix xfsaild hang due to lost wake ups Brian Foster
2012-05-23 0:58 ` Dave Chinner
2012-05-23 13:05 ` Brian Foster
2012-05-24 0:01 ` Dave Chinner
2012-05-23 17:48 ` Brian Foster
2012-05-23 18:19 ` Mark Tinguely
2012-05-23 23:41 ` Brian Foster
2012-05-23 23:53 ` Dave Chinner
2012-05-24 14:38 ` Mark Tinguely
2012-05-24 0:06 ` Dave Chinner
2012-05-24 13:07 ` Brian Foster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337704714-50235-2-git-send-email-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox