splitting iovecs to bios
Max Gurtovoy
maxg at mellanox.com
Thu Dec 10 12:20:54 UTC 2015
Hi all,
I'm developing an iSER (iSCSI extensions for RDMA) driver for FreeBSD
11-Current and I encounter some weired behaviour while testing IOs with
iovcnt > 1.
I wrote a small test program that creates an iovec struct (let's say in
size of 4) and each iov_base starts from page begining and 4k len:
0 iov_base 0xe25000 iov_len 4096
1 iov_base 0xe26000 iov_len 4096
2 iov_base 0xe27000 iov_len 4096
3 iov_base 0xe28000 iov_len 4096
I use readv/writev to send this iovec data.
I saw that my driver get 4 different bio requests even thought this
vector is aligned. This is surprising becasue in other OS I get only 1 bio.
I have noticed the the physio function in sys/kern/kern_physio.c is
praparing one bio for each iovec entry.
is there a reason for this kind of implementation ? is there an option
to send this array using 1 bio (some flag) ?
We can improve performance if we send it in 1 bio instead of 4.
My driver supports BIO_UNMAPPED.
Thanks,
Max Gurtovoy.
Mellanox Technologies.
More information about the freebsd-scsi
mailing list