qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-scsi-dataplane: Use main thread BH to set BDS' aio context
Date: Fri, 13 Feb 2015 18:29:41 +0800	[thread overview]
Message-ID: <20150213102941.GA19672@ad.nay.redhat.com> (raw)
In-Reply-To: <54DDC623.8000307@redhat.com>

On Fri, 02/13 10:38, Paolo Bonzini wrote:
> 
> 
> On 13/02/2015 02:21, Fam Zheng wrote:
> >> Could you just do set_aio_context for all devices when starting
> >> dataplane?  For example with a new scsi_device_set_aio_context function
> >> (and a new method in SCSIDeviceClass).
> >>
> >> Maybe I'm missing the obvious. :)
> > 
> > Per VQ IOThread stills needs it, in the case that guest switches the VQ of a
> > disk on the fly.
> 
> Per VQ iothread is far away though.  Multiqueue aims at parallelizing
> accesses *to the same disk from different CPUs*, not at parallelizing
> accesses to different disks.  As long as bdrv_set_aio_context does
> bdrv_drain_all, something has to change for multiqueue dataplane: either
> stop using bdrv_set_aio_context, or stop doing bdrv_drain_all.
> 
> In either case, the changes are large enough that we shouldn't code for
> a case that doesn't exist yet.
> 
> In addition, making the code more similar for virtio-blk and virtio-scsi
> dataplane is good, because the same changes can apply to both in the future.

I think we should avoid duplicate everything on both virtio-blk and
virtio-scsi, so they will have differences.

Why do you think Per VQ iothread is far away? Limiting to 1 thread for the
whole scsi bus doesn't sound ultimate solution for me. I think it's not harder
than the MMIO safety work we have, and also somehow independent to it.

But yes, stop using bdrv_set_aio_context will be the other way to make it
right, just harder to do.

Fam

  reply	other threads:[~2015-02-13 10:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12  5:20 [Qemu-devel] [PATCH 0/3] virtio-scsi: Fix unsafe bdrv_set_aio_context calls Fam Zheng
2015-02-12  5:21 ` [Qemu-devel] [PATCH 1/3] block: Forbid bdrv_set_aio_context outside BQL Fam Zheng
2015-02-13 13:10   ` Paolo Bonzini
2015-03-10 13:34   ` Stefan Hajnoczi
2015-02-12  5:21 ` [Qemu-devel] [PATCH 2/3] virtio-scsi: Deduplicate cmd queue handling code of dataplane Fam Zheng
2015-02-12  5:21 ` [Qemu-devel] [PATCH 3/3] virtio-scsi-dataplane: Use main thread BH to set BDS' aio context Fam Zheng
2015-02-12 14:29   ` Paolo Bonzini
2015-02-13  1:21     ` Fam Zheng
2015-02-13  9:38       ` Paolo Bonzini
2015-02-13 10:29         ` Fam Zheng [this message]
2015-02-13 10:38           ` Paolo Bonzini
2015-02-13 12:42             ` Fam Zheng
2015-02-13 13:12               ` Paolo Bonzini

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=20150213102941.GA19672@ad.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).