All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-aio@kvack.org, target-devel@vger.kernel.org,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Benjamin LaHaise <bcrl@kvack.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Anthony Liguori <anthony@codemonkey.ws>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 0/5] Add vhost-blk support
Date: Tue, 17 Jul 2012 13:49:20 +0300	[thread overview]
Message-ID: <20120717104920.GJ7949@redhat.com> (raw)
In-Reply-To: <50053B09.2060703@redhat.com>

On Tue, Jul 17, 2012 at 12:14:33PM +0200, Paolo Bonzini wrote:
> Il 17/07/2012 11:45, Michael S. Tsirkin ha scritto:
> >> So it begs the question, is it going to be used in production, or just a
> >> useful reference tool?
> > 
> > Sticking to raw already makes virtio-blk faster, doesn't it?
> > In that vhost-blk looks to me like just another optimization option.
> > Ideally I think user just should not care where do we handle virtio:
> > in-kernel or in userspace.  One can imagine it being enabled/disabled
> > automatically if none of the features unsupported by it are used.
> 
> Ok, that would make more sense.  One difference between vhost-blk and
> vhost-net is that for vhost-blk there are also management actions that
> would trigger the switch, for example a live snapshot.
> So a prerequisite for vhost-blk would be that it is possible to disable
> it on the fly while the VM is running, as soon as all in-flight I/O is
> completed.

It applies for vhost-net too. For example if you bring link down,
we switch to userspace. So vhost-net supports this switch on the fly.

> (Note that, however, this is not possible for vhost-scsi,
> because it
> really exposes different hardware to the guest.  It must not happen that
> a kernel upgrade or downgrade toggles between userspace SCSI and
> vhost-scsi, for example).

I would say this is not a prerequisite for merging in qemu.
It might be a required feature for production but it
is also solvable at the management level.

Imagine an "enable-live-snapshots" flag in libvirt, on by default.
Can only be changed while guest is down. If you turn it off,
you get a bit more speed since vhost-blk/vhost-scsi gets enabled.
Also pls note that a backend can support live snapshots.
If it does libvirt thinkably could detect that
and enable vhost-scsi even with enable-live-snapshots on.

> >> having to
> >> support the API; having to handle transition from one more thing when
> >> something better comes out.
> > 
> > Well this is true for any code. If the limited featureset which
> > vhost-blk can accelerate is something many people use, then accelerating
> > by 5-15% might outweight support costs.
> 
> It is definitely what people use if they are interested in performance.
> 
> Paolo

In that case it seems to me we should stop using the featureset as
an argument and focus on whether the extra code is worth the 5-15% gain.
No one seems to have commented on that so everyone on list thinks that
aspect is OK? Any explicit ACKs?

Kernel merge windows is coming up and I would like to see whether
any of vhost-blk / vhost-scsi is going to be actually used by userspace.
I guess we could tag it for staging but would be nice to avoid that.

-- 
MST

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Asias He <asias@redhat.com>, Stefan Hajnoczi <stefanha@gmail.com>,
	linux-kernel@vger.kernel.org, linux-aio@kvack.org,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	Benjamin LaHaise <bcrl@kvack.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, nab@linux-iscsi.org,
	target-devel@vger.kernel.org,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [PATCH 0/5] Add vhost-blk support
Date: Tue, 17 Jul 2012 13:49:20 +0300	[thread overview]
Message-ID: <20120717104920.GJ7949@redhat.com> (raw)
In-Reply-To: <50053B09.2060703@redhat.com>

On Tue, Jul 17, 2012 at 12:14:33PM +0200, Paolo Bonzini wrote:
> Il 17/07/2012 11:45, Michael S. Tsirkin ha scritto:
> >> So it begs the question, is it going to be used in production, or just a
> >> useful reference tool?
> > 
> > Sticking to raw already makes virtio-blk faster, doesn't it?
> > In that vhost-blk looks to me like just another optimization option.
> > Ideally I think user just should not care where do we handle virtio:
> > in-kernel or in userspace.  One can imagine it being enabled/disabled
> > automatically if none of the features unsupported by it are used.
> 
> Ok, that would make more sense.  One difference between vhost-blk and
> vhost-net is that for vhost-blk there are also management actions that
> would trigger the switch, for example a live snapshot.
> So a prerequisite for vhost-blk would be that it is possible to disable
> it on the fly while the VM is running, as soon as all in-flight I/O is
> completed.

It applies for vhost-net too. For example if you bring link down,
we switch to userspace. So vhost-net supports this switch on the fly.

> (Note that, however, this is not possible for vhost-scsi,
> because it
> really exposes different hardware to the guest.  It must not happen that
> a kernel upgrade or downgrade toggles between userspace SCSI and
> vhost-scsi, for example).

I would say this is not a prerequisite for merging in qemu.
It might be a required feature for production but it
is also solvable at the management level.

Imagine an "enable-live-snapshots" flag in libvirt, on by default.
Can only be changed while guest is down. If you turn it off,
you get a bit more speed since vhost-blk/vhost-scsi gets enabled.
Also pls note that a backend can support live snapshots.
If it does libvirt thinkably could detect that
and enable vhost-scsi even with enable-live-snapshots on.

> >> having to
> >> support the API; having to handle transition from one more thing when
> >> something better comes out.
> > 
> > Well this is true for any code. If the limited featureset which
> > vhost-blk can accelerate is something many people use, then accelerating
> > by 5-15% might outweight support costs.
> 
> It is definitely what people use if they are interested in performance.
> 
> Paolo

In that case it seems to me we should stop using the featureset as
an argument and focus on whether the extra code is worth the 5-15% gain.
No one seems to have commented on that so everyone on list thinks that
aspect is OK? Any explicit ACKs?

Kernel merge windows is coming up and I would like to see whether
any of vhost-blk / vhost-scsi is going to be actually used by userspace.
I guess we could tag it for staging but would be nice to avoid that.

-- 
MST

  reply	other threads:[~2012-07-17 10:49 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 15:35 [PATCH 0/5] Add vhost-blk support Asias He
2012-07-12 15:35 ` Asias He
2012-07-12 15:35 ` [PATCH 1/5] aio: Export symbols and struct kiocb_batch for in kernel aio usage Asias He
2012-07-12 15:35   ` Asias He
2012-07-12 17:50   ` James Bottomley
2012-07-13  1:40     ` Asias He
2012-07-13  1:40     ` Asias He
2012-07-13  1:40       ` Asias He
2012-07-12 15:35 ` Asias He
2012-07-12 16:06 ` [PATCH 0/5] Add vhost-blk support Jeff Moyer
2012-07-12 16:06   ` Jeff Moyer
2012-07-13  1:19   ` Asias He
2012-07-13  1:19   ` Asias He
2012-07-13  1:19     ` Asias He
2012-07-12 16:06 ` Jeff Moyer
2012-07-16 11:58 ` Stefan Hajnoczi
2012-07-16 11:58 ` Stefan Hajnoczi
2012-07-16 11:58   ` Stefan Hajnoczi
2012-07-17  8:29   ` Asias He
2012-07-17  8:29   ` Asias He
2012-07-17  8:29     ` Asias He
2012-07-17  8:52     ` Paolo Bonzini
2012-07-17  8:52       ` Paolo Bonzini
2012-07-17  9:21       ` Asias He
2012-07-17  9:21       ` Asias He
2012-07-17  9:21         ` Asias He
2012-07-17  9:32         ` Paolo Bonzini
2012-07-17  9:32           ` Paolo Bonzini
2012-07-17  9:51           ` Michael S. Tsirkin
2012-07-17  9:51             ` Michael S. Tsirkin
2012-07-17  9:51           ` Michael S. Tsirkin
2012-07-17  9:32         ` Paolo Bonzini
2012-07-17 11:11         ` Stefan Hajnoczi
2012-07-17 11:11           ` Stefan Hajnoczi
2012-07-17 11:26           ` Michael S. Tsirkin
2012-07-17 11:26             ` Michael S. Tsirkin
2012-07-17 11:42             ` Stefan Hajnoczi
2012-07-17 11:42               ` Stefan Hajnoczi
2012-07-17 11:51               ` Stefan Hajnoczi
2012-07-17 11:51                 ` Stefan Hajnoczi
2012-07-17 11:54               ` Michael S. Tsirkin
2012-07-17 11:54               ` Michael S. Tsirkin
2012-07-17 11:54                 ` Michael S. Tsirkin
2012-07-17 12:03                 ` Stefan Hajnoczi
2012-07-17 12:03                   ` Stefan Hajnoczi
2012-07-17 12:48                   ` Michael S. Tsirkin
2012-07-17 12:48                   ` Michael S. Tsirkin
2012-07-17 12:48                     ` Michael S. Tsirkin
2012-07-17 13:02                     ` Paolo Bonzini
2012-07-17 13:02                       ` Paolo Bonzini
2012-07-17 13:26                       ` Michael S. Tsirkin
2012-07-17 13:26                       ` Michael S. Tsirkin
2012-07-18  8:47                       ` Asias He
2012-07-18  8:47                         ` Asias He
2012-07-18  8:47                       ` Asias He
2012-07-17 11:26           ` Michael S. Tsirkin
2012-07-18  8:12           ` Asias He
2012-07-18  8:12           ` Asias He
2012-07-18  8:12             ` Asias He
2012-07-18  8:26             ` Stefan Hajnoczi
2012-07-18  8:26               ` Stefan Hajnoczi
2012-07-17 11:11         ` Stefan Hajnoczi
2012-07-18  9:46         ` Ronen Hod
2012-07-18  9:46         ` Ronen Hod
2012-07-18  9:46           ` Ronen Hod
2012-07-17  9:45       ` Michael S. Tsirkin
2012-07-17  9:45         ` Michael S. Tsirkin
2012-07-17 10:14         ` Paolo Bonzini
2012-07-17 10:14           ` Paolo Bonzini
2012-07-17 10:49           ` Michael S. Tsirkin [this message]
2012-07-17 10:49             ` Michael S. Tsirkin
2012-07-17 10:56             ` Paolo Bonzini
2012-07-17 10:56               ` Paolo Bonzini
2012-07-17 11:09               ` Michael S. Tsirkin
2012-07-17 11:09               ` Michael S. Tsirkin
2012-07-17 11:09                 ` Michael S. Tsirkin
2012-07-17  9:45       ` Michael S. Tsirkin
2012-07-17  8:52     ` Paolo Bonzini
2012-07-17 11:36     ` Stefan Hajnoczi
2012-07-17 11:36     ` Stefan Hajnoczi
2012-07-17 11:36       ` 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=20120717104920.GJ7949@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=bcrl@kvack.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.