Re: [Qemu-devel] [PATCH][RFC] Linux AIO support when using O_DIRECT

Avi Kivity
2009-03-23T16:17:43Z

Anthony Liguori wrote:
> This is just a first cut. It needs a fair bit of cleanup before it can be
> committed. I also think we need to fixup the AIO abstractions a bit.
>
> I wanted to share though in case anyone is interested in doing some performance
> comparisons. It seems to work although I haven't exercised it very much.
>
>
> +typedef struct AIOOperations
> +{
> + struct qemu_aiocb *(*get_aiocb)(void);
> + void (*put_aiocb)(struct qemu_aiocb *);
> + int (*read)(struct qemu_aiocb *);
> + int (*write)(struct qemu_aiocb *);
> + int (*error)(struct qemu_aiocb *);
> + ssize_t (*get_result)(struct qemu_aiocb *aiocb);
> + int (*cancel)(int fd, struct qemu_aiocb *aiocb);
> +} AIOOperations;
> +
>

Instead of introducing yet another layer of indirection, you could add
block-raw-linux-aio, which would be registered before block-raw-posix
(which is realy block-raw-threadpool...), and resist a ->probe() if
caching is enabled.

--
error compiling committee.c: too many arguments to function