On 5/5/22 11:08 AM, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Use the bounded workqueue functionality to spread the inode chunk scan > load across the CPUs more evenly. First, we create per-AG workers to > walk each AG's inode btree to create inode batch work items for each > inobt record. These items are added to a (second) bounded workqueue > that invokes BULKSTAT and invokes the caller's function on each bulkstat > record. > > By splitting the work items into batches of 64 inodes instead of one > thread per AG, we keep the level of parallelism at a reasonably high > level almost all the way to the end of the inode scan if the inodes are > not evenly divided across AGs or if a few files have far more extent > records than average. > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> Insofar as I at least read through it, applied it, built it, and regression-tested it and didn't see anything wrong, Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>