]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Merge tag 'scrub-repair-scheduling-6.10_2024-07-29' of https://git.kernel.org/pub...
authorCarlos Maiolino <cem@kernel.org>
Tue, 6 Aug 2024 13:47:09 +0000 (15:47 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 6 Aug 2024 13:47:09 +0000 (15:47 +0200)
xfs_scrub: improve scheduling of repair items [v30.9 10/28]

Currently, phase 4 of xfs_scrub uses per-AG repair item lists to
schedule repair work across a thread pool.  This scheme is suboptimal
when most of the repairs involve a single AG because all the work gets
dumped on a single pool thread.

Instead, we should create a thread pool with the same number of workers
as CPUs, and dispatch individual repair tickets as separate work items
to maximize parallelization.

However, we also need to ensure that repairs to space metadata and file
metadata are kept in separate queues because file repairs generally
depend on correctness of space metadata.

This has been running on the djcloud for months with no problems.  Enjoy!

Signed-off-by: Darrick J. Wong <djwong@kernel.org>

Trivial merge