On 10/29/19 3:51 AM, Ming Lei wrote:
__blk_queue_split() may be a bit heavy for small block size(such as 512B, or 4KB) IO, so introduce one flag to decide if this bio includes multiple page. And only consider to try splitting this bio in case that the multiple page flag is set. ~3% - 5% IOPS improvement can be observed on io_uring test over null_blk(MQ), and the io_uring test code is from fio/t/io_uring.c bch_bio_map() should be the only one which doesn't use bio_add_page(), so force to mark bio built via bch_bio_map() as MULTI_PAGE. RAID5 has similar usage too, however the bio is really single-page bio, so not necessary to handle it.
Although this patch looks fine to me, I'm concerned about the new flag. That's additional state information and something that could get out of sync. Has it been considered to implement this optimization by handling
bio->bi_vcnt == 1 separately at the start of blk_bio_segment_split()? Thanks, Bart.