M Ming Lei #
Message details and related content
Hi, This patchset brings multipage bvec into block layer. Basic xfstests(-a auto) over virtio-blk/virtio-scsi have been run and no regression is found, so it should be good enough to show the approach now, and any comments are welcome! 1) what is multipage bvec? Multipage bvecs means that one 'struct bio_bvec' can hold multiple pages which are physically contiguous instead of one single page used in linux kernel for long time. 2) why is multipage bvec introduced? Kent proposed the idea[1] first. As system's RAM becomes much bigger than before, and at the same time huge page, transparent huge page and memory compaction are widely used, it is a bit easy now to see physically contiguous pages from fs in I/O. On the other hand, from block layer's view, it isn't necessary to store intermediate pages into bvec, and it is enough to just store the physicallly contiguous 'segment'. Also huge pages are being brought to filesystem[2], we can do IO a hugepage a time[3], requires that one bio can transfer at least one huge page one time. Turns out it isn't flexiable to change BIO_MAX_PAGES simply[3]. Multipage bvec can fit in this case very well. With multipage bvec: - bio size can be increased and it should improve some high-bandwidth IO case in theory[4]. - Inside block layer, both bio splitting and sg map can become more efficient than before by just traversing the physically contiguous 'segment' instead of each page.