tag name | discard-relax-locks_2024-04-23 (4a9fdb58aa435f45789b18f726edaf5ae1b2956d) |
tag date | 2024-04-23 20:53:19 -0700 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 437627107a... |
download | xfs-linux-discard-relax-locks_2024-04-23.tar.gz |
---|
xfs: less heavy locks during fstrim [v30.3 16/54]
Congratulations! You have made it to the final patchset of the main
online fsck feature! This patchset fixes some stalling behavior that I
observed when running FITRIM against large flash-based filesystems with
very heavily fragmented free space data. In summary -- the current
fstrim implementation optimizes for trimming the largest free extents
first, and holds the AGF lock for the duration of the operation. This
is great if fstrim is being run as a foreground process by a sysadmin.
For xfs_scrub, however, this isn't so good -- we don't really want to
block on one huge kernel call while reporting no progress information.
We don't want to hold the AGF so long that background processes stall.
These problems are easily fixable by issuing smaller FITRIM calls, but
there's still the problem of walking the entire cntbt. To solve that
second problem, we introduce a new sub-AG FITRIM implementation. To
solve the first problem, make it relax the AGF periodically.
This has been running on the djcloud for months with no problems. Enjoy!
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZiiCLwAKCRBKO3ySh0YR
pkrwAQDBLkPTxcfScvDNV+DmV/Og64ZZ0MRtDw8H11gaodC6nQD+MSErv7qy8svW
iJRhXS+HF3K1tUF+MVIh+fcNQ2Qq2gY=
=SK7C
-----END PGP SIGNATURE-----