From: Paolo Bonzini <pbonzini@redhat.com>
To: Roman Penyaev <roman.penyaev@profitbricks.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 3/3] linux-aio: process completions from ioq_submit()
Date: Tue, 19 Jul 2016 13:30:41 +0200 [thread overview]
Message-ID: <7f6b108c-1ae6-fded-f252-d0aefaf3d568@redhat.com> (raw)
In-Reply-To: <CAJrWOzCtjYSbf9zSOz+OQLs=FFMR38gUUxA-g+ybD_0jo56s9A@mail.gmail.com>
On 19/07/2016 13:18, Roman Penyaev wrote:
>> > No need for this new field. You can just do nothing here and check
>> > laiocb.ret == -EINPROGRESS here in laio_co_submit.
>
> I have thought but did not like it, because we depend on the value,
> which kernel writes there.
(The kernel actually writes to ev->res).
> If kernel by chance writes -EINPROGRESS
> (whatever that means, bug in some ll driver?) we are screwed up.
> But probably that is my paranoia.
Understood. However, QEMU relies elsewhere on EINPROGRESS not being
returned for file I/O, so I think it's safe.
> Also, I hope (I do not know how to reproduce this, virtio_blk does not nest),
> that we are allowed to nest (calling aio_poll() and all this machinery) from
> co-routine.
Hmm, good question. The nesting scenario originally happened exactly
from a coroutine (commit_run), but I suspect that it cannot happen
anymore since we've introduced block_job_defer_to_main_loop and
bdrv_co_drain. In any case your patch wouldn't change that.
Paolo
> Are we? We can lead to deep nesting inside the following sequence:
> ioq_submit() -> complete() -> aio_poll() -> ioq_submit() -> complete() ...
> but that can happen of course even without this patch. I would say this nesting
> is a clumsy stuff.
Paolo
next prev parent reply other threads:[~2016-07-19 11:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 10:25 [Qemu-devel] [PATCH 0/3] linux-aio: reduce completion latency Roman Pen
2016-07-19 10:25 ` [Qemu-devel] [PATCH 1/3] linux-aio: consume events in userspace instead of calling io_getevents Roman Pen
2016-07-19 10:25 ` [Qemu-devel] [PATCH 2/3] linux-aio: split processing events function Roman Pen
2016-07-19 10:25 ` [Qemu-devel] [PATCH 3/3] linux-aio: process completions from ioq_submit() Roman Pen
2016-07-19 10:36 ` Paolo Bonzini
2016-07-19 11:18 ` Roman Penyaev
2016-07-19 11:30 ` Paolo Bonzini [this message]
2016-07-19 11:44 ` Roman Penyaev
2016-07-19 11:47 ` Paolo Bonzini
2016-07-19 11:52 ` Roman Penyaev
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=7f6b108c-1ae6-fded-f252-d0aefaf3d568@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=roman.penyaev@profitbricks.com \
--cc=stefanha@redhat.com \
/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).