Re: [RFC] adding aio_readv/writev

Shailabh Nagar (nagar@watson.ibm.com)
Mon, 23 Sep 2002 15:52:21 -0400


Clement T. Cole wrote:

>>>Comments, reasons for not doing async readv/writev directly welcome.
>>>
>
>How about the case for it... See Pages 404-406 [Section 12.7] of
>Richard Steven's ``Advanced Programming in the Unix Environment''
>[aka APUE]. Richard measures almost a factor of 2 difference
>in system time between using vectored I/O and not using it on
>a Sun and on a x86.
>
It would have been nice to have corresponding data for the async path.

><snip>
>
>So... let's get back to the basic issue....
>
>We know that vectored/scatter gather I/O can help a number of real
>applications ... Richard demonstrated that. We have some examples
>[like DB2] that have use vectored I/O successfully. We also
>know asynchronous I/O has been demonstrated to be useful and
>know that some commerical folks have used that.
>
>I'm gather from some of the comments, adding async/vectored
>will make an already complex subsystem, even more so [i.e. not
>a resounding endorsement for sure this is easy].
>

I wouldn't say so. Adding async vectored I/O to the 2.5 code won't make
it more complex since the underlying functions
do handle iovec's anyway.

>
>
>So the question is can async vectored I/O be implemented
>to have a positive gain, such as it did within the traditonal one.
>If the complexity is too high and it does not help much...then
>maybe this is a Chimera to leave alone. But.... if it can be
>done with some level of elegance... well.... the past history is
>that the commerical folks have used those features.
>

It seems to be a case of "complexity is low, benefits are unknown". I
guess the best thing is to develop a patch and see what people think
about the complexity part. The benefits part will become clear only when
the async interfaces are reasonable functional and we can compare the
following

- call async readv directly
vs
- multiple calls to io_submit using one iocb (each call corresponds to
one element of user's vector)
vs
- single call to io_submit using multiple iocb's (each iocb corresponds
to one element of user's vector)

Since the raw/O_DIRECT interfaces offer asynchrony (through Badari
Pulavarty & Mingming Cao's patches), it should be possible to test this
out.

More on this shortly,
- Shailabh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/