Re: [PATCH 1/2] aio: add vectored I/O support
From: Avi Kivity
Date: Sat Oct 16 2004 - 03:44:37 EST
Joel Becker wrote:
On Sat, Oct 16, 2004 at 07:18:45AM +0200, Avi Kivity wrote:
It is a huge performance win, at least on the 2.4-based RHEL kernel.
Large reads (~256K) using 4K iocbs are very slow on a large RAID, while
after I coded a similar patch I got a substantial speedup.
I'd think we should fix the submission path instead. Why create
iovs _and_ iocbs when we only need to create one? And even if we
decided aio_readv() was still nice to keep, we'd want to fix this
inefficiency in io_submit().
Using IO_CMD_READ for a vector entails
- converting the userspace structure (which might well an iovec) to iocbs
- copying all those iocbs to the kernel
- merging the iocbs
- generating multiple completions for the merged request
- copying the completions to userspace
- coalescing the multiple completions in userspace to a single completion
error handling is difficult as well. one would expect that a bad sector
with multiple iocbs would only fail one of the requests. it seems to be
non-trivial to implement this correctly.
IO_CMD_PREADV, by contrast, is very simple, intuitive, and efficient.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/