Hi Ming, This is my cmd to run qemu: qemu-2.12.0/x86_64-softmmu/qemu-system-x86_64 -enable-kvm -device virtio-balloon -cpu host -smp 4 -m 2G -drive file=/root/html/fedora-10g.img,format=raw,cache=none,aio=native,if=none,id=drive-virtio-disk1 -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=1 -drive file=/dev/sdb,format=raw,cache=none,aio=native,if=none,id=drive-virtio-disk2 -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk2,id=virtio-disk2,bootindex=2 -device virtio-net,netdev=nw1,mac=00:11:22:EE:EE:10 -netdev tap,id=nw1,script=no,downscript=no,ifname=tap0 -serial mon:stdio -nographic -object memory-backend-file,id=mem0,size=2G,mem-path=/dev/hugepages,share=on -numa node,memdev=mem0 -vnc 0.0.0.0:100 -machine usb=on,nvdimm -device usb-tablet -monitor unix:///tmp/a.socket,server,nowait -qmp tcp:0.0.0.0:2234,server,nowait OS image is Fedora 31. Kernel is 5.3.7-301.fc31.x86_64. The address from virio in qemu like this: ========= size: 262144, iovcnt: 64 0: size: 4096 addr: 0x7fffc83f1000 1: size: 4096 addr: 0x7fffc8037000 2: size: 4096 addr: 0x7fffd3710000 3: size: 4096 addr: 0x7fffd5624000 4: size: 4096 addr: 0x7fffc766c000 5: size: 4096 addr: 0x7fffc7c21000 6: size: 4096 addr: 0x7fffc8d54000 7: size: 4096 addr: 0x7fffc8fc6000 8: size: 4096 addr: 0x7fffd5659000 9: size: 4096 addr: 0x7fffc7f88000 10: size: 4096 addr: 0x7fffc767b000 11: size: 4096 addr: 0x7fffc8332000 12: size: 4096 addr: 0x7fffb4297000 13: size: 4096 addr: 0x7fffc8888000 14: size: 4096 addr: 0x7fffc93d7000 15: size: 4096 addr: 0x7fffc9f1f000 They are not contiguous pages, so the pages in bvec are not continus physical pages. I don't know how to dump the bvec address in bio without recompiling the kernel. IO Pattern in guest is : root@192.168.19.239 02:39:29 ~ $ cat 256k-randread.fio [global] ioengine=libaio invalidate=1 ramp_time=5 iodepth=1 runtime=120000 time_based direct=1 [randread-vdb-256k-para] bs=256k stonewall filename=/dev/vdb rw=randread Thanks. Ming Lei <ming.lei@xxxxxxxxxx> 于2020年3月13日周五 上午10:32写道: > > On Thu, Mar 12, 2020 at 09:21:11PM +0800, Feng Li wrote: > > Hi Ming, > > Thanks. > > I have tested kernel '5.4.0-rc6+', which includes 07173c3ec276. > > But the virtio is still be filled with single page by page. > > Hello, > > Could you share your test script? > > BTW, it depends if fs layer passes contiguous pages to block layer. > > You can dump each bvec of the bio, and see if they are contiguous > physically. > > Thanks, > Ming > > > > > Ming Lei <ming.lei@xxxxxxxxxx> 于2020年3月12日周四 下午8:34写道: > > > > > > On Thu, Mar 12, 2020 at 07:13:28PM +0800, Feng Li wrote: > > > > Hi experts, > > > > > > > > May I ask a question about block layer? > > > > When running fio in guest os, I find a 256k IO is split into the page > > > > by page in bio, saved in bvecs. > > > > And virtio-blk just put the bio_vec one by one in the available > > > > descriptor table. > > > > > > > > So if my backend device does not support iovector > > > > opertion(preadv/pwritev), then IO is issued to a low layer page by > > > > page. > > > > My question is: why doesn't the bio save multi-pages in one bio_vec? > > > > > > We start multipage bvec since v5.1, especially since 07173c3ec276 > > > ("block: enable multipage bvecs"). > > > > > > Thanks, > > > Ming > > > > > > > -- > Ming >