From: Sergio Lopez <slp@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Sergio Lopez <slp@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [PATCH v4 0/2] nbd/server: Quiesce coroutines on context switch
Date: Mon, 1 Feb 2021 13:50:30 +0100 [thread overview]
Message-ID: <20210201125032.44713-1-slp@redhat.com> (raw)
This series allows the NBD server to properly switch between AIO contexts,
having quiesced recv_coroutine and send_coroutine before doing the transition.
We need this because we send back devices running in IO Thread owned contexts
to the main context when stopping the data plane, something that can happen
multiple times during the lifetime of a VM (usually during the boot sequence or
on a reboot), and we drag the NBD server of the correspoing export with it.
While there, fix also a problem caused by a cross-dependency between
closing the export's client connections and draining the block
layer. The visible effect of this problem was QEMU getting hung when
the guest request a power off while there's an active NBD client.
v4:
- Call to blk_exp_close_all() from qemu-nbd and qemu-storage-daemon
too. (Kevin Wolf)
v3:
- Drop already merged "block: Honor blk_set_aio_context() context
requirements" and "nbd/server: Quiesce coroutines on context switch"
- Change the strategy for avoiding processing BDS twice to adding
every child and parent to the ignore list in advance before
processing them. (Kevin Wolf)
- Replace "nbd/server: Quiesce coroutines on context switch" with
"block: move blk_exp_close_all() to qemu_cleanup()"
v2:
- Replace "virtio-blk: Acquire context while switching them on
dataplane start" with "block: Honor blk_set_aio_context() context
requirements" (Kevin Wolf)
- Add "block: Avoid processing BDS twice in
bdrv_set_aio_context_ignore()"
- Add "block: Close block exports in two steps"
- Rename nbd_read_eof() to nbd_server_read_eof() (Eric Blake)
- Fix double space and typo in comment. (Eric Blake)
Sergio Lopez (2):
block: Avoid processing BDS twice in bdrv_set_aio_context_ignore()
block: move blk_exp_close_all() to qemu_cleanup()
block.c | 35 +++++++++++++++++++++-------
qemu-nbd.c | 1 +
softmmu/runstate.c | 9 +++++++
storage-daemon/qemu-storage-daemon.c | 1 +
4 files changed, 38 insertions(+), 8 deletions(-)
--
2.26.2
next reply other threads:[~2021-02-01 12:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 12:50 Sergio Lopez [this message]
2021-02-01 12:50 ` [PATCH v4 1/2] block: Avoid processing BDS twice in bdrv_set_aio_context_ignore() Sergio Lopez
2021-02-01 12:50 ` [PATCH v4 2/2] block: move blk_exp_close_all() to qemu_cleanup() Sergio Lopez
2021-02-01 15:31 ` [PATCH v4 0/2] nbd/server: Quiesce coroutines on context switch 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=20210201125032.44713-1-slp@redhat.com \
--to=slp@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).