From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, hreitz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH for-8.2 0/4] block: Fix deadlocks with the stream job
Date: Wed, 15 Nov 2023 13:36:01 -0500 [thread overview]
Message-ID: <20231115183601.GC313373@fedora> (raw)
In-Reply-To: <20231115172012.112727-1-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]
On Wed, Nov 15, 2023 at 06:20:08PM +0100, Kevin Wolf wrote:
> This series contains three fixes for deadlocks that follow the same
> pattern: A nested event loop in the main thread waits for an iothread to
> make progress, but the AioContext lock of that iothread is still held by
> the main loop, so it can never make progress.
>
> We're planning to fully remove the AioContext lock in 9.0, which would
> automatically get rid of this kind of bugs, but it's still there in 8.2,
> so let's fix them individually for this release.
>
> Kevin Wolf (4):
> block: Fix bdrv_graph_wrlock() call in blk_remove_bs()
> block: Fix deadlocks in bdrv_graph_wrunlock()
> stream: Fix AioContext locking during bdrv_graph_wrlock()
> iotests: Test two stream jobs in a single iothread
>
> include/block/graph-lock.h | 15 +++-
> block.c | 26 +++----
> block/backup.c | 2 +-
> block/blklogwrites.c | 4 +-
> block/blkverify.c | 2 +-
> block/block-backend.c | 10 ++-
> block/commit.c | 10 +--
> block/graph-lock.c | 23 +++++-
> block/mirror.c | 14 ++--
> block/qcow2.c | 2 +-
> block/quorum.c | 4 +-
> block/replication.c | 10 +--
> block/snapshot.c | 2 +-
> block/stream.c | 10 +--
> block/vmdk.c | 10 +--
> blockdev.c | 4 +-
> blockjob.c | 8 +-
> tests/unit/test-bdrv-drain.c | 20 ++---
> tests/unit/test-bdrv-graph-mod.c | 10 +--
> scripts/block-coroutine-wrapper.py | 2 +-
> tests/qemu-iotests/tests/iothreads-stream | 73 +++++++++++++++++++
> tests/qemu-iotests/tests/iothreads-stream.out | 11 +++
> 22 files changed, 197 insertions(+), 75 deletions(-)
> create mode 100755 tests/qemu-iotests/tests/iothreads-stream
> create mode 100644 tests/qemu-iotests/tests/iothreads-stream.out
>
> --
> 2.41.0
>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-11-15 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 17:20 [PATCH for-8.2 0/4] block: Fix deadlocks with the stream job Kevin Wolf
2023-11-15 17:20 ` [PATCH for-8.2 1/4] block: Fix bdrv_graph_wrlock() call in blk_remove_bs() Kevin Wolf
2023-11-15 17:20 ` [PATCH for-8.2 2/4] block: Fix deadlocks in bdrv_graph_wrunlock() Kevin Wolf
2023-11-15 17:20 ` [PATCH for-8.2 3/4] stream: Fix AioContext locking during bdrv_graph_wrlock() Kevin Wolf
2023-11-15 17:20 ` [PATCH for-8.2 4/4] iotests: Test two stream jobs in a single iothread Kevin Wolf
2023-11-15 18:36 ` Stefan Hajnoczi [this message]
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=20231115183601.GC313373@fedora \
--to=stefanha@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@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).