linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] adding aio_readv/writev
@ 2002-09-20 20:39 Shailabh Nagar
       [not found] ` <1032555981.2082.10.camel@dell_ss3.pdx.osdl.net>
  0 siblings, 1 reply; 9+ messages in thread
From: Shailabh Nagar @ 2002-09-20 20:39 UTC (permalink / raw)
  To: Ben LaHaise
  Cc: Andrew Morton, Alexander Viro, linux-aio, linux-kernel, lse-tech

Ben,

Currently there is no way to initiate an aio readv/writev in 2.5. There 
were no aio_readv/writev calls in 2.4 either - I'm wondering if there 
was any particular reason for excluding readv/writev operations from aio ?

The read/readv paths have anyway been merged for raw/O_DIRECT and 
regular file read/writes. So why not expose the vector read/write to the 
user by adding the IOCB_CMD_PREADV/IOCB_CMD_READV and 
IOCB_CMD_PWRITEV/IOCB_CMD_WRITEV commands to the aio set. Without that, 
raw/O_DIRECT readv users would need to unnecessarily cycle through their 
iovecs at a library level submitting them individually.
For larger iovecs, user/library code would needlessly deal with multiple 
completions. While I'm not sure of the performance impact of the absence 
of aio_readv/writev, it seems easy enough to provide.
Most of the functions are already in place. We would only
need a way to pass the iovec through the iocb.

I was thinking of something like this:

struct iocb {

+union {
        __u64	aio_buf
+      __u64	aio_iovp
+}
+union {
        __u64	aio_nbytes
+      __u64	aio_nsegs
+}

allowing the iovec * & nsegs to be passed into sys_io_submit. Some code 
would be added (within case handling of IOCB_CMD_READV within 
io_submit_one) to copy & verify the iovec pointers and then call 
aio_readv/aio_writev (if its defined for the fs).

What do you think ? I wanted to get some feedback before trying to code 
this up.

While we are on the topic of expanding aio operations, what about 
providing IOCB_CMD_READ/WRITE, distinct from their pread/pwrite 
counterparts ? Do you think thats needed ?

- Shailabh
	


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: [RFC] adding aio_readv/writev
@ 2002-09-23 17:59 Chen, Kenneth W
  0 siblings, 0 replies; 9+ messages in thread
From: Chen, Kenneth W @ 2002-09-23 17:59 UTC (permalink / raw)
  To: Benjamin LaHaise, Shailabh Nagar
  Cc: Stephen Hemminger, Andrew Morton, Alexander Viro, linux-aio,
	linux-kernel

ben> Only db2 uses vectored io heavily.  Oracle does not, and none of the
open 
ben> source databases do.  Vectored io is pretty useless for most people.

That's not necessary true. As far as I know, the reason oracle doesn't use
vectored io is because the real implementation is not there.

- Ken

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <200209231851.g8NIpea12782@igw2.watson.ibm.com>]

end of thread, other threads:[~2002-09-24 14:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 20:39 [RFC] adding aio_readv/writev Shailabh Nagar
     [not found] ` <1032555981.2082.10.camel@dell_ss3.pdx.osdl.net>
2002-09-23 14:30   ` Shailabh Nagar
2002-09-23 18:53     ` Clement T. Cole
     [not found]     ` <20020923114104.A11680@redhat.com>
2002-09-24 13:20       ` John Gardiner Myers
2002-09-24 13:52         ` Stephen C. Tweedie
2002-09-24 14:13           ` John Gardiner Myers
2002-09-23 17:59 Chen, Kenneth W
     [not found] <200209231851.g8NIpea12782@igw2.watson.ibm.com>
2002-09-23 19:52 ` Shailabh Nagar
2002-09-23 20:39   ` Clement T. Cole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).