From: Brian Foster <bfoster@redhat.com>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: umount XFS hung when stopping the xfsaild kthread
Date: Thu, 7 Sep 2017 08:24:30 -0400 [thread overview]
Message-ID: <20170907122430.GB60838@bfoster.bfoster> (raw)
In-Reply-To: <20170906224107.GL29261@wotan.suse.de>
cc linux-xfs
On Thu, Sep 07, 2017 at 12:41:07AM +0200, Luis R. Rodriguez wrote:
> On Wed, Sep 06, 2017 at 07:11:45AM -0400, Brian Foster wrote:
> > FWIW, I ran a quick test on for-next since there hasn't been a reply to
> > this thread in that regard. Add a 10s delay between
> > kthread_should_stop() and __set_current_state() in xfsaild (when
> > unmounting and AIL is empty) and a 5s delay before kthread_stop() in
> > xfs_trans_ail_destroy() and the problem reproduces consistently.
>
> Do you mean as follows?
>
Essentially, though I also included empty AIL (!xfs_ail_min) and
unmounting (mp->m_flags & XFS_MOUNT_UNMOUNTING) logic to limit the
xfsaild delay to the case where care about.
Brian
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 354368a906e5..475134833a4d 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -515,6 +515,7 @@ xfsaild(
> set_freezable();
>
> while (!kthread_should_stop()) {
> + ssleep(10);
> if (tout && tout <= 20)
> __set_current_state(TASK_KILLABLE);
> else
> @@ -805,6 +806,7 @@ xfs_trans_ail_destroy(
> {
> struct xfs_ail *ailp = mp->m_ail;
>
> + ssleep(5);
> kthread_stop(ailp->xa_task);
> kmem_free(ailp);
> }
prev parent reply other threads:[~2017-09-07 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 13:48 umount XFS hung when stopping the xfsaild kthread Hou Tao
2017-09-05 18:27 ` Brian Foster
2017-09-06 10:59 ` Hou Tao
2017-09-06 11:13 ` Brian Foster
2017-09-05 23:00 ` Dave Chinner
2017-09-06 11:11 ` Brian Foster
2017-09-06 11:47 ` Dave Chinner
2017-09-06 12:18 ` Brian Foster
[not found] ` <20170906224107.GL29261@wotan.suse.de>
2017-09-07 12:24 ` Brian Foster [this message]
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=20170907122430.GB60838@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.