Darrick J. Wong a7a686cb07 xfs: cache a bunch of inodes for repair scans
After observing xfs_scrub taking forever to rebuild parent pointers on a
pptrs enabled filesystem, I decided to profile what the system was
doing.  It turns out that when there are a lot of threads trying to scan
the filesystem, most of our time is spent contending on AGI buffer
locks.  Given that we're walking the inobt records anyway, we can often
tell ahead of time when there's a bunch of (up to 64) consecutive inodes
that we could grab all at once.

Do this to amortize the cost of taking the AGI lock across as many
inodes as we possibly can.  On the author's system this seems to improve
parallel throughput from barely one and a half cores to slightly
sublinear scaling.  The obvious antipattern here of course is where the
freemask has every other bit set (e.g. all 0xA's)

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2024-02-22 12:30:47 -08:00
..
2023-12-15 10:03:45 -08:00
2024-01-10 08:45:22 -08:00
2023-12-07 14:51:07 +05:30
2024-02-19 21:19:33 +05:30
2024-02-19 21:19:33 +05:30
2024-02-19 21:19:33 +05:30
2023-11-08 13:22:16 -08:00
2024-02-19 21:19:33 +05:30
2024-02-17 09:32:32 +05:30