On Tue, Jan 24, 2023 at 10:55:25PM +0800, Anand Jain wrote: > > I was curious about the commit message. > I ran fio to test the performance before and after the change. > The results were similar. > > fio --group_reporting=1 --directory /mnt/test --name dioread --direct=1 > --size=1g --rw=read --runtime=60 --iodepth=1024 --nrfiles=16 --numjobs=16 > > before this patch > READ: bw=8208KiB/s (8405kB/s), 8208KiB/s-8208KiB/s (8405kB/s-8405kB/s), > io=481MiB (504MB), run=60017-60017msec > > after this patch > READ: bw=8353KiB/s (8554kB/s), 8353KiB/s-8353KiB/s (8554kB/s-8554kB/s), > io=490MiB (513MB), run=60013-60013msec That's 4k reads. The will benefit from the inline csum array in the btrfs_bio, but won't benefit from the existing batching, so this is kind of expected. The good news is that the final series will still use the inline csum array for small reads, while also only doing a single csum tree lookup for larger reads, so you'll get the best of both worlds.