[PATCH] xfs: don't let suspend freeze the buffer workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suspend has this annoying behavior in XFS where it freezes workqueues in
some arbitrary order.  This is a problem because the sync call can cause
an AIL push, which may have to perform a RMW cycle on an inode cluster
buffer if that buffer has been reclaimed.  When this happens, the AIL
issues a buffer read for which the io completion ends up on the xfs_buf
workqueue.  If /that/ workqueue has already been frozen, the suspend
will timeout because we froze the workqueues in the wrong order.

It seems suspicious to be freezing IO helper threads[1], so let's just
not do that anymore.  Prior to this patch, 4.10 fails to suspend on my
laptop about 80% of the time; afterwards, it works every time.  I've not
done much suspend-and-crash testing on it though.

[1] https://lwn.net/Articles/705269/

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
 fs/xfs/xfs_super.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 7af5ca9..216ab89 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -842,7 +842,7 @@ xfs_init_mount_workqueues(
 	struct xfs_mount	*mp)
 {
 	mp->m_buf_workqueue = alloc_workqueue("xfs-buf/%s",
-			WQ_MEM_RECLAIM|WQ_FREEZABLE, 1, mp->m_fsname);
+			WQ_MEM_RECLAIM, 1, mp->m_fsname);
 	if (!mp->m_buf_workqueue)
 		goto out;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux