public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	target-devel@vger.kernel.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
Date: Tue, 12 Mar 2013 09:34:09 +0800	[thread overview]
Message-ID: <20130312013409.GC1480@hj.localdomain> (raw)
In-Reply-To: <20130311115356.GD23359@redhat.com>

On Mon, Mar 11, 2013 at 01:53:56PM +0200, Michael S. Tsirkin wrote:
> On Mon, Mar 11, 2013 at 12:36:37PM +0100, Paolo Bonzini wrote:
> > Il 11/03/2013 06:09, Asias He ha scritto:
> > > This patch makes vhost_scsi_flush() wait for all the pending requests
> > > issued before the flush operation to be finished.
> > 
> > There is no protection against issuing concurrent flush operations.  If
> > we later would like to make the flush a ioctl (for example for migration
> > purposes),
> 
> For migration I think we need to stop vhost, flush isn't useful
> if we keep submitting requests afterwards.
> 
> > it would be confusing, and I'm not sure how you could extend
> > the during_flush machinery.
> > 
> > What about making vhost_scsi_flush() wait for all pending requests,
> > including those issues during the flush operation?  Then you can easily
> > support concurrent flushes; just add a waitqueue and wake_up_all at the
> > end of the flush operation.
> > 
> > BTW, adding such a ioctl as part of this patch would probably be a good
> > thing to do anyway.
> > 
> > Paolo
> 
> Please keep it separate, it's painful enough that we have a driver
> with to established userspace, I don't want to add ioctls
> until it's used by some upstream.

Let's add the ioctls later.

> -- 
> MST

-- 
Asias

  parent reply	other threads:[~2013-03-12  1:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1362978579-13322-1-git-send-email-asias@redhat.com>
2013-03-11  5:09 ` [PATCH 1/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush() Asias He
2013-03-11 11:36   ` Paolo Bonzini
2013-03-11 11:53     ` Michael S. Tsirkin
2013-03-11 12:15       ` Paolo Bonzini
2013-03-12  1:34       ` Asias He [this message]
2013-03-12  1:31     ` Asias He
2013-03-12  8:21       ` Paolo Bonzini
2013-03-13  5:16         ` Asias He
2013-03-19  2:03           ` Asias He
2013-03-11  5:09 ` [PATCH 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint() Asias He

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=20130312013409.GC1480@hj.localdomain \
    --to=asias@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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