How to send 1MB I/O size in a single I/O request without split
Sibananda Sahu
sibananda.sahu at avagotech.com
Thu Jan 29 18:56:44 UTC 2015
Hi All,
Recently we have added large I/O size of 1MB in our LSI controller and for
that we have implemented the same in driver.
But I have observed that the large I/O that an application is able to send
is 128KB in one I/O request.
I used the following command to send 1MB I/O:
# ddpt if=/dev/da0 of=/dev/zero count=1 bs=1M
But I have observed that the number of scatter gather elements per I/O
request always comes 1 and the I/O length comes as 128KB(max).
How can I get an I/O request from an application that will send 256 scatter
gather elements of size 4K each(which makes a single 1MB I/O request).
I have seen this kind of request in LINUX, but in FreeBSD I have received
only 1 sge count and 128KB max I/O length.
mrsas(4) driver reports to CAM layer that it supports 1MB I/O size.
ccb->cpi.maxio = sc->max_num_sge * MRSAS_PAGE_SIZE; [Final value
that is reported is (256 * 4096)]
After a little investigation I found the following in sys/cam/scsi/scsi_da.c
if (cpi.maxio == 0)
softc->disk->d_maxsize = DFLTPHYS; /* traditional default */
else if (cpi.maxio > MAXPHYS)
softc->disk->d_maxsize = MAXPHYS; /* for safety */
else
softc->disk->d_maxsize = cpi.maxio;
So even if the controller supports max I/O size greater than 128KB, it is
restricted to 128KB only.
I have changed the value of MAXPHYS from (128 * 1024) to (1024 * 1024) just
to see if I can get 1MB I/O request to driver and simultaneously whether
the driver can process 1M I/O size or not.
I observed that after this modification I am able to get 1MB I/O request
from the application.
Number of sge is still 1 but the I/O length is now 1MB.
Further information:
Mrsas(4) driver supports UNMAPPED I/O.
I have exercised the same thing with UNMAPPED I/O disabled but the result
was same.
So my primary questions are:
- How can I send a large I/O size of 1MB in a single I/O request
without any split?
- Why I am getting always 1 scatter gather element?
- How can I get more sge count in an I/O request?
Thanks,
Sibananda Sahu
Device driver developer @ AVAGO Technologies.
More information about the freebsd-scsi
mailing list