qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()
Date: Thu, 7 Dec 2017 16:04:49 -0600	[thread overview]
Message-ID: <50b97dbd-ebee-d84c-939b-bd7d8a6c0f13@redhat.com> (raw)
In-Reply-To: <20171207201320.19284-2-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On 12/07/2017 02:13 PM, Stefan Hajnoczi wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> BDRV_POLL_WHILE() does not support recursive AioContext locking.  It
> only releases the AioContext lock once regardless of how many times the
> caller has acquired it.  This results in a hang since the IOThread does
> not make progress while the AioContext is still locked.
> 
> The following steps trigger the hang:
> 
>   $ qemu-system-x86_64 -M accel=kvm -m 1G -cpu host \
>                        -object iothread,id=iothread0 \
>                        -device virtio-scsi-pci,iothread=iothread0 \
>                        -drive if=none,id=drive0,file=test.img,format=raw \
>                        -device scsi-hd,drive=drive0 \
>                        -drive if=none,id=drive1,file=test.img,format=raw \
>                        -device scsi-hd,drive=drive1
>   $ qemu-system-x86_64 ...same options... \
>                        -incoming tcp::1234
>   (qemu) migrate tcp:127.0.0.1:1234
>   ...hang...
> 
> Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  block.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-12-07 22:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 20:13 [Qemu-devel] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all() Stefan Hajnoczi
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 1/6] " Stefan Hajnoczi
2017-12-07 22:04   ` Eric Blake [this message]
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 2/6] docs: mark nested AioContext locking as a legacy API Stefan Hajnoczi
2017-12-07 22:34   ` Eric Blake
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 3/6] blockdev: add x-blockdev-set-iothread force boolean Stefan Hajnoczi
2017-12-07 22:38   ` Eric Blake
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 4/6] iotests: add VM.add_object() Stefan Hajnoczi
2017-12-07 22:39   ` Eric Blake
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 5/6] iothread: fix iothread_stop() race condition Stefan Hajnoczi
2017-12-07 22:42   ` Eric Blake
2017-12-07 20:13 ` [Qemu-devel] [PATCH v2 6/6] qemu-iotests: add 203 savevm with IOThreads test Stefan Hajnoczi
2017-12-07 22:46   ` Eric Blake
2017-12-13 21:23 ` [Qemu-devel] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all() Paolo Bonzini
2017-12-14 11:12 ` Stefan Hajnoczi

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=50b97dbd-ebee-d84c-939b-bd7d8a6c0f13@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --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).