On Wed, Mar 23, 2022 at 02:59:10PM +0800, Qu Wenruo wrote: >> How do we waste memory? We stop allocating the btrfs_io_context now >> which can be quite big. > > Doesn't we waste the embedded __stripe if we choose to use the pointer one? > And vice versus. > > And for SINGLE profile, we don't really need btrfs_bio_stripe at all, we > can fast-path just setting bdev and bi_sector, and submit without even > overriding its endio/private. Yes, the 16 byes of the embedded stripe is wasted for I/O that doesn't use it. But all reads use it, which is typically the majority of all I/O and the most performance critical one. If the "waste" is a concern we can split out a separate btrfs_read_bio. Chance are that it will just use slack by the time this all settles with a bunch of other members that can be removed or unioned.