[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 11/12] qemu-io: adds support for io_uring
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 11/12] qemu-io: adds support for io_uring |
Date: |
Tue, 11 Jun 2019 10:54:17 +0100 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On Mon, Jun 10, 2019 at 07:19:04PM +0530, Aarushi Mehta wrote:
> Signed-off-by: Aarushi Mehta <address@hidden>
> ---
> qemu-io.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/qemu-io.c b/qemu-io.c
> index 8d5d5911cb..54b82151c4 100644
> --- a/qemu-io.c
> +++ b/qemu-io.c
> @@ -129,6 +129,7 @@ static void open_help(void)
> " -n, -- disable host cache, short for -t none\n"
> " -U, -- force shared permissions\n"
> " -k, -- use kernel AIO implementation (on Linux only)\n"
> +" -i -- use kernel io_uring (Linux 5.1+)\n"
> " -t, -- use the given cache mode for the image\n"
> " -d, -- use the given discard mode for the image\n"
> " -o, -- options to be given to the block driver"
> @@ -188,6 +189,11 @@ static int open_f(BlockBackend *blk, int argc, char
> **argv)
> case 'k':
> flags |= BDRV_O_NATIVE_AIO;
> break;
> +#ifdef CONFIG_LINUX_IO_URING
> + case 'i':
> + flags |= BDRV_O_IO_URING;
> + break;
> +#endif
> case 't':
> if (bdrv_parse_cache_mode(optarg, &flags, &writethrough) < 0) {
> error_report("Invalid cache option: %s", optarg);
> @@ -290,6 +296,7 @@ static void usage(const char *name)
> " -C, --copy-on-read enable copy-on-read\n"
> " -m, --misalign misalign allocations for O_DIRECT\n"
> " -k, --native-aio use kernel AIO implementation (on Linux only)\n"
> +" -i --io_uring use kernel io_uring (Linux 5.1+)\n"
> " -t, --cache=MODE use the given cache mode for the image\n"
> " -d, --discard=MODE use the given discard mode for the image\n"
> " -T, --trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
> @@ -499,6 +506,7 @@ int main(int argc, char **argv)
> { "copy-on-read", no_argument, NULL, 'C' },
> { "misalign", no_argument, NULL, 'm' },
> { "native-aio", no_argument, NULL, 'k' },
> + { "io_uring", no_argument, NULL, 'i' },
> { "discard", required_argument, NULL, 'd' },
> { "cache", required_argument, NULL, 't' },
> { "trace", required_argument, NULL, 'T' },
> @@ -566,6 +574,11 @@ int main(int argc, char **argv)
> case 'k':
> flags |= BDRV_O_NATIVE_AIO;
> break;
> +#ifdef CONFIG_LINUX_IO_URING
> + case 'i':
> + flags |= BDRV_O_IO_URING;
> + break;
> +#endif
An --aio=threads|native|io_uring option would be more general than
adding --io_uring. That new AIO engines do not require their own
command-line options.
Can you implement something like the -drive aio= parameter so that a
single option can specify threads, native, or io_uring?
Thanks,
Stefan
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [PATCH v5 07/12] blockdev: accept io_uring as option, (continued)
[Qemu-devel] [PATCH v5 09/12] block: add trace events for io_uring, Aarushi Mehta, 2019/06/10
[Qemu-devel] [PATCH v5 10/12] block/io_uring: adds userspace completion polling, Aarushi Mehta, 2019/06/10
[Qemu-devel] [PATCH v5 11/12] qemu-io: adds support for io_uring, Aarushi Mehta, 2019/06/10
[Qemu-devel] [PATCH v5 12/12] qemu-iotests/087: checks for io_uring, Aarushi Mehta, 2019/06/10
Re: [Qemu-devel] [PATCH v5 00/12] Add support for io_uring, Stefan Hajnoczi, 2019/06/11