qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 17/17] block/io_uring: enable kernel submissi


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v9 17/17] block/io_uring: enable kernel submission polling
Date: Fri, 2 Aug 2019 09:08:22 +0100
User-agent: Mutt/1.12.0 (2019-05-25)

On Fri, Aug 02, 2019 at 05:10:31AM +0530, Aarushi Mehta wrote:
> Signed-off-by: Aarushi Mehta <address@hidden>
> ---
>  block/io_uring.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)

How does SQPOLL performance compare?

> diff --git a/block/io_uring.c b/block/io_uring.c
> index 1553cd2e58..2a1d79704a 100644
> --- a/block/io_uring.c
> +++ b/block/io_uring.c
> @@ -288,6 +288,17 @@ static int ioq_submit(LuringState *s)
>              *sqes = luringcb->sqeq;
>              QSIMPLEQ_REMOVE_HEAD(&s->io_q.submit_queue, next);
>          }
> +        /*
> +         * io_uring_submit() returns sqes in ring for kernel side
> +         * submission polling and sets wakeup flag if needed.
> +         *
> +         * It is not possible for any sqes to have already been
> +         * submitted by the sq_poll as the writes are only made visible
> +         * to the kernel in this function.
> +         *
> +         * For normal I/O, it returns the actual submitted requests
> +         * from io_uring_enter()
> +         */
>          ret = io_uring_submit(&s->ring);
>          trace_luring_io_uring_submit(s, ret);
>          /* Prevent infinite loop if submission is refused */
> @@ -525,7 +536,11 @@ LuringState *luring_init(Error **errp)
>      s = g_new0(LuringState, 1);
>      trace_luring_init_state(s, sizeof(*s));
>      struct io_uring *ring = &s->ring;
> -    rc = io_uring_queue_init(MAX_EVENTS, ring, 0);
> +
> +    rc = io_uring_queue_init(MAX_EVENTS, ring, IORING_SETUP_SQPOLL);
> +    if (rc == -EOPNOTSUPP) {
> +            rc = io_uring_queue_init(MAX_EVENTS, ring, 0);

Please use 4-space indentation.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]