On 2022/3/23 14:13, Christoph Hellwig wrote:
On Wed, Mar 23, 2022 at 09:14:06AM +0800, Qu Wenruo wrote:
Really not a fan of enlarging btrfs_bio again and again.
Especially for the btrfs_bio_stripe and btrfs_bio_stripe * part.
Considering how many bytes we waste for SINGLE profile, now we need an
extra pointer which we will never really use.
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.
Thanks,
Qu