From: Benjamin LaHaise <bcrl@redhat.com>
To: Janet Morgan <janetmor@us.ibm.com>
Cc: Christoph Hellwig <hch@sgi.com>,
akpm@digeo.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-aio@kvack.org
Subject: Re: [RFC] iovec in ->aio_read/->aio_write
Date: Wed, 16 Oct 2002 11:06:42 -0400 [thread overview]
Message-ID: <20021016110642.A9121@redhat.com> (raw)
In-Reply-To: <200210160651.g9G6pMm17385@eng4.beaverton.ibm.com>; from janetmor@us.ibm.com on Tue, Oct 15, 2002 at 11:51:21PM -0700
On Tue, Oct 15, 2002 at 11:51:21PM -0700, Janet Morgan wrote:
> - 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
> - routine aio.c/io_readv_writev, which borrows heavily from do_readv_writev.
A few comments about the interface to userland: don't add fields to the
iocb, that breaks the abi. Also, the iovec should be pointed to by
iocb->aio_buf, with aio_nbytes containing the length of the iovec (that
avoids the need for an additional field). The structure of the iovec
itself should probably match the iovec struct, but that means we'll need
different opcodes for the 32 bit and 64 bit variants. Alternatively a
new iovec that is the same on both (like the iocb) could be defined, but
that would be inconvenient for userland.
Within the kernel, the loff_t *pos shouldn't be a pointer -- I'm trying to
get rid of extraneous pointers as that means an additional chunk of memory
has to be held over the entirety of the aio request. Similarly, the iovec
passed into the operation itself can never be allocated on the stack. This
probably works for direct io where the iovec gets translated into a scatter
gather list of pages, but wouldn't work for something like networking where
the iovec itself gets used to determine where in the user address space to
copy data (as this can occur after the submit operation has returned).
Aside from those details, I guess if people really need vectored ios it's
okay.
-ben
next prev parent reply other threads:[~2002-10-16 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-16 2:33 [RFC] iovec in ->aio_read/->aio_write Christoph Hellwig
2002-10-15 19:34 ` Benjamin LaHaise
2002-10-16 6:51 ` Janet Morgan
2002-10-16 13:41 ` Shailabh Nagar
2002-10-16 15:06 ` Benjamin LaHaise [this message]
2002-10-17 11:22 ` Janet Morgan
-- strict thread matches above, loose matches on Subject: below --
2002-10-16 14:40 Helen Pang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021016110642.A9121@redhat.com \
--to=bcrl@redhat.com \
--cc=akpm@digeo.com \
--cc=hch@sgi.com \
--cc=janetmor@us.ibm.com \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).