From: Kevin Wolf <kwolf@redhat.com>
To: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Cc: qemu-block@nongnu.org, Hanna Reitz <hreitz@redhat.com>,
Stefan Weil <sw@weilnetz.de>,
Aarushi Mehta <mehta.aaru20@gmail.com>,
Julia Suvorova <jusual@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Fam Zheng <fam@euphon.net>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 1/3] linux-aio: use LinuxAioState from the running thread
Date: Fri, 28 Oct 2022 17:39:52 +0200 [thread overview]
Message-ID: <Y1v3yD+1wP6y1fFq@redhat.com> (raw)
In-Reply-To: <20221028122048.3101120-2-eesposit@redhat.com>
Am 28.10.2022 um 14:20 hat Emanuele Giuseppe Esposito geschrieben:
> From: Paolo Bonzini <pbonzini@redhat.com>
>
> Remove usage of aio_context_acquire by always submitting asynchronous
> AIO to the current thread's LinuxAioState.
>
> In order to prevent mistakes from the caller side, avoid passing LinuxAioState
> in laio_io_{plug/unplug} and laio_co_submit.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> @@ -354,14 +354,18 @@ static uint64_t laio_max_batch(LinuxAioState *s, uint64_t dev_max_batch)
> return max_batch;
> }
>
> -void laio_io_plug(BlockDriverState *bs, LinuxAioState *s)
> -{
> +void laio_io_plug(void){
The brace should be on the next line.
> + AioContext *ctx = qemu_get_current_aio_context();
> + LinuxAioState *s = aio_get_linux_aio(ctx);
> +
> s->io_q.plugged++;
> }
Kevin
next prev parent reply other threads:[~2022-10-28 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 12:20 [PATCH v3 0/3] AioContext removal: LinuxAioState and ThreadPool Emanuele Giuseppe Esposito
2022-10-28 12:20 ` [PATCH v3 1/3] linux-aio: use LinuxAioState from the running thread Emanuele Giuseppe Esposito
2022-10-28 15:39 ` Kevin Wolf [this message]
2022-10-28 12:20 ` [PATCH v3 2/3] io_uring: use LuringState " Emanuele Giuseppe Esposito
2022-10-28 12:20 ` [PATCH v3 3/3] thread-pool: use ThreadPool " Emanuele Giuseppe Esposito
2022-10-28 15:34 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1v3yD+1wP6y1fFq@redhat.com \
--to=kwolf@redhat.com \
--cc=eesposit@redhat.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=jusual@redhat.com \
--cc=mehta.aaru20@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).