]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: move inode flush to the sync workqueue
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 12 Apr 2020 20:11:10 +0000 (13:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Apr 2020 16:07:42 +0000 (09:07 -0700)
commitac16845adc9737536dea3d639f65e14955dfe184
treea6c6b8ee0d2135cd9a0261eef500574a9e094a1a
parentdaf8492cfafef547509542eeb438f4fe624faa2b
xfs: move inode flush to the sync workqueue

Move the inode dirty data flushing to a workqueue so that multiple
threads can take advantage of a single thread's flushing work.  The
ratelimiting technique used in bdd4ee4 was not successful, because
threads that skipped the inode flush scan due to ratelimiting would
ENOSPC early, which caused occasional (but noticeable) changes in
behavior and sporadic fstest regressions.

Therefore, make all the writer threads wait on a single inode flush,
which eliminates both the stampeding hordes of flushers and the small
window in which a write could fail with ENOSPC because it lost the
ratelimit race after even another thread freed space.

Fixes: 892624a6f09a ("xfs: ratelimit inode flush on buffered write ENOSPC")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c