Thread (2 messages) 2 messages, 2 authors, 2002-10-16

Re: [RFC] iovec in ->aio_read/->aio_write

From: Shailabh Nagar <hidden>
Date: 2002-10-16 13:41:03
Also in: lkml

Janet Morgan wrote:
Here's a patch for aio readv/writev support.  Basically it adds:

- two new opcodes (IOCB_CMD_PREADV and IOCB_CMD_PWRITEV)
- a field to the iocb for the user vector
- aio_readv/writev methods to the file_operations structure
I presume f_op->aio_readv could point to __generic_file_aio_read for most
filesystems.

Would f_op->aio_writev need a new wrapper function for 2.5.42 ?
f_op->aio_write eventually calls generic_file_write which uses a different inode
from generic_file_writev. So f_op->aio_writev might need to point to a function
like generic_file_writev but using the same inode as generic_file_write.

- routine aio.c/io_readv_writev, which borrows heavily from do_readv_writev. 

I tested this using the aio dio patch that Badari submitted a while back. 
I compared:
                readv/writev io_submit for a vector of N iovecs 
                vs read/write io_submit for N iocbs.

My performance data is only preliminary at this point, but aio readv/writev 
appears to outperform aio read/write -- twice as fast in some cases.  The 
results generally make sense to me:  while there is only one io_submit in both 
cases, aio readv/writev shortens codepath (one instead of N calls to the 
underlying filesystem routine) and should normally result in fewer 
Twice as fast looks good !
bios/callbacks (at least for direct-io).  As importantly, aio readv/writev 
in my testing also reduces the number of (system) calls to io_getevents.
It would be interesting to see the performance boost when <iov length> events
are retrieved at once, using the min_nr parameter of io_getevents.


--Shailabh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help