qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Alberto Garcia <berto@igalia.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 0/6] Acquire the AioContext during _realize()
Date: Fri, 18 Jan 2019 11:14:15 +0100	[thread overview]
Message-ID: <20190118101415.GC4530@dhcp-200-176.str.redhat.com> (raw)
In-Reply-To: <20190118095652.GA21579@stefanha-x1.localdomain>

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

Am 18.01.2019 um 10:56 hat Stefan Hajnoczi geschrieben:
> On Thu, Jan 17, 2019 at 02:24:10PM +0100, Alberto Garcia wrote:
> > On Wed 16 Jan 2019 02:54:44 PM CET, Stefan Hajnoczi wrote:
> > > This patch series makes virtio-blk and virtio-scsi more robust,
> > > although I haven't checked what happens if the drive is attached to a
> > > different IOThread than the device - will the switchover work?
> > 
> > You mean if you use x-blockdev-set-iothread with a drive and then attach
> > it to a device using a different thread? That seems to work (with my
> > patch).
> 
> Does it work with a running VM that will do I/O?  If yes, then that's
> great and we should merge the virtio-blk/scsi patches to make them
> robust for this case.  I'm a little surprised it works though :-)
> because the code wasn't designed or tested for this.

There are two ways to trigger the crash even without
x-blockdev-set-iothread:

* device_del, then device_add for a device with iothread (virtio-scsi;
  may or may not exist with virtio-blk)
  https://bugzilla.redhat.com/show_bug.cgi?id=1656276

* Simply attach two devices with iothread to the the same node
  https://bugzilla.redhat.com/show_bug.cgi?id=1662508

Maybe this series is actually papering over the real problems, though.
Unplug should move the BDS back to the main AioContext, and attaching
two users with different AioContexts must fail. If we don't take care
there, the locking will be wrong.

Note that even though there are more problems, we still need this series
so we can allow attaching two devices to the same node while using the
same iothread.

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2019-01-18 10:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 14:23 [Qemu-devel] [PATCH v2 0/6] Acquire the AioContext during _realize() Alberto Garcia
2019-01-14 14:23 ` [Qemu-devel] [PATCH v2 1/6] block: Acquire the AioContext in virtio_blk_device_realize() Alberto Garcia
2019-01-14 14:24 ` [Qemu-devel] [PATCH v2 2/6] block: Acquire the AioContext in scsi_*_realize() Alberto Garcia
2019-01-14 14:24 ` [Qemu-devel] [PATCH v2 3/6] block: Acquire the AioContext in floppy_drive_realize() Alberto Garcia
2019-01-14 14:24 ` [Qemu-devel] [PATCH v2 4/6] block: Acquire the AioContext in nvme_realize() Alberto Garcia
2019-01-14 14:24 ` [Qemu-devel] [PATCH v2 5/6] block: Acquire the AioContext in ide_dev_initfn() Alberto Garcia
2019-01-14 14:24 ` [Qemu-devel] [PATCH v2 6/6] block: Acquire the AioContext in usb_msd_storage_realize() Alberto Garcia
2019-01-16 13:54 ` [Qemu-devel] [PATCH v2 0/6] Acquire the AioContext during _realize() Stefan Hajnoczi
2019-01-17 13:24   ` Alberto Garcia
2019-01-18  9:56     ` Stefan Hajnoczi
2019-01-18 10:14       ` Kevin Wolf [this message]
2019-01-22 13:56         ` Alberto Garcia
2019-01-18 10:35 ` 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=20190118101415.GC4530@dhcp-200-176.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).