The following 5 patches to xfs_repair improve scalability on high
IOPS devices. They remove contention points that limit the number of
IO threads that we can use, whilst also protecting against using too
The first patch removes a contention point in a 3rd party
translation library by avoiding translating static data repeatedly.
The second separates the per-ag locks into separate cachelines, so
we don't get threads working on different AGs contending on
cachelines shared by non-shared locks.
THe third parallelises phase 6, which was never done because the
original repair parallelism work didn't show it to be a significant
contributor to runtime. Even serialised it was as fast as the
parallelised phases. However, that's a different story now with SSDs
- it's the only phase that is CPU bound because it doesn't spread
the work across multiple CPUs, and so is by far the slowest phase of
repair on SSDs.
The fourht patch corrects a problem with CPU usage in the buffer
cache - the hash table distributions are awful.
Finally, the last patch fixes a problem reported by Michael Semon
where too much concurrency was being used by xfs_repair and hence
failing because it was unable to allocate threads.