From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy
<vladimir.sementsov-ogievskiy@openvz.org>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, v.sementsov-og@mail.ru, jsnow@redhat.com,
qemu-devel@nongnu.org, armbru@redhat.com, vsementsov@openvz.org,
stefanha@redhat.com, eblake@redhat.com
Subject: Re: [PATCH v2 4/7] util: add qemu-co-timeout
Date: Fri, 1 Apr 2022 15:13:55 +0200 [thread overview]
Message-ID: <a6360f9e-008c-210f-0037-26054d99d44f@redhat.com> (raw)
In-Reply-To: <20220401091920.287612-5-vsementsov@openvz.org>
On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote:
> Add new API, to make a time limited call of the coroutine.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
> ---
> include/qemu/coroutine.h | 13 ++++++
> util/meson.build | 1 +
> util/qemu-co-timeout.c | 89 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 103 insertions(+)
> create mode 100644 util/qemu-co-timeout.c
I don’t really understand what this does. Intuitively, I would have
assumed this makes the first yield of the respective coroutine not
return when the timeout has elapsed, and instead, we switch back to
qemu_co_timeout(), which returns to its callers.
But it looks like when this yield happens and we switch back to
qemu_co_timeout(), the coroutine actually isn’t cancelled, and will just
continue running, actually. Is that right? On first look, this looks
like it’ll be quite difficult to think about what happens when this is
used, because the coroutine in question is no longer run in sequence
with its caller, but actually might run in parallel (even though it’s
still a coroutine, so it’ll remain cooperative multitasking).
next prev parent reply other threads:[~2022-04-01 13:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 9:19 [PATCH v2 0/7] copy-before-write: on-cbw-error and cbw-timeout Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 1/7] block/copy-before-write: refactor option parsing Vladimir Sementsov-Ogievskiy
2022-04-01 10:50 ` Hanna Reitz
2022-04-01 11:59 ` Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 2/7] block/copy-before-write: add on-cbw-error open parameter Vladimir Sementsov-Ogievskiy
2022-04-01 11:58 ` Hanna Reitz
2022-04-01 12:18 ` Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 3/7] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
2022-04-01 13:36 ` Hanna Reitz
2022-04-01 9:19 ` [PATCH v2 4/7] util: add qemu-co-timeout Vladimir Sementsov-Ogievskiy
2022-04-01 13:13 ` Hanna Reitz [this message]
2022-04-01 14:23 ` Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 5/7] block/block-copy: block_copy(): add timeout_ns parameter Vladimir Sementsov-Ogievskiy
2022-04-01 13:16 ` Hanna Reitz
2022-04-01 13:22 ` Hanna Reitz
2022-04-01 16:08 ` Vladimir Sementsov-Ogievskiy
2022-04-04 14:39 ` Hanna Reitz
2022-04-05 11:33 ` Vladimir Sementsov-Ogievskiy
2022-04-06 16:10 ` Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 6/7] block/copy-before-write: implement cbw-timeout option Vladimir Sementsov-Ogievskiy
2022-04-01 13:24 ` Hanna Reitz
2022-04-01 13:28 ` Hanna Reitz
2022-04-01 13:58 ` Vladimir Sementsov-Ogievskiy
2022-04-01 9:19 ` [PATCH v2 7/7] iotests: copy-before-write: add cases for " Vladimir Sementsov-Ogievskiy
2022-04-01 13:36 ` Hanna Reitz
2022-04-01 13:59 ` Vladimir Sementsov-Ogievskiy
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=a6360f9e-008c-210f-0037-26054d99d44f@redhat.com \
--to=hreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=v.sementsov-og@mail.ru \
--cc=vladimir.sementsov-ogievskiy@openvz.org \
--cc=vsementsov@openvz.org \
/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).