All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Ouyang, Changchun" <changchun.ouyang@intel.com>
Cc: "snabb-devel@googlegroups.com" <snabb-devel@googlegroups.com>,
	Marcel Apfelbaum <marcel.a@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>,
	Luke Gorrie <luke@snabb.co>,
	"Long, Thomas" <thomas.long@intel.com>,
	"rkhan@redhat.com" <rkhan@redhat.com>
Subject: Re: [Qemu-devel] [snabb-devel] Re: [PATCH v5] vhost-user: add multi queue support
Date: Thu, 9 Jul 2015 10:31:23 +0300	[thread overview]
Message-ID: <20150709100645-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <F52918179C57134FAEC9EA62FA2F962511BEF01F@shsmsx102.ccr.corp.intel.com>

On Thu, Jul 09, 2015 at 01:29:48AM +0000, Ouyang, Changchun wrote:
> 
> 
> > -----Original Message-----
> > From: snabb-devel@googlegroups.com [mailto:snabb-
> > devel@googlegroups.com] On Behalf Of Maxime Leroy
> > Sent: Thursday, July 9, 2015 6:01 AM
> > To: Michael S. Tsirkin
> > Cc: Ouyang, Changchun; snabb-devel@googlegroups.com; Marcel
> > Apfelbaum; qemu-devel@nongnu.org; Nikolay Nikolaev; Luke Gorrie; Long,
> > Thomas; rkhan@redhat.com
> > Subject: [snabb-devel] Re: [Qemu-devel] [PATCH v5] vhost-user: add multi
> > queue support
> > 
> > Hi Michael,
> > 
> > On Wed, Jul 8, 2015 at 4:29 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > On Thu, May 28, 2015 at 09:23:06AM +0800, Ouyang Changchun wrote:
> > >> Based on patch by Nikolay Nikolaev:
> > >> Vhost-user will implement the multi queue support in a similar way to
> > >> what vhost already has - a separate thread for each queue.
> > >> To enable the multi queue functionality - a new command line
> > >> parameter "queues" is introduced for the vhost-user netdev.
> > >>
> > >> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
> > >> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> > >
> > > So testing turned up a significant issue with the protocol extension
> > > in this one.  Specifically, remote has no idea how many queues guest
> > > actually wants to use (it's dynamic, guest changes this at any time).
> > > We need support for enabling and disabling queues dynamically.
> 
> Do you mean we need control queue to negotiate the actual queue number between
> Guest and host? Or something like that

Exactly. In fact vhost user currently gets CTRL_VQ feature flag
which it really shouldn't since dpdk does not handle the
control VQ.

> > >
> > > Given we are past hard freeze, and given no one uses this yet (dpdk
> > > upstream did not merge supporting protocol), I think the best thing to
> > > do is to disable this functionality for 2.4.
> > > I will send a patch to do this shortly.
> > 
> > You are making a wrong statement, we already use multiqueue for vhost-
> > user and we expected to have this support officially integrated in qemu 2.4.
> > 
> > Libvirt 1.2.17 has been released with multiqueue support for vhost-user.
> > (http://libvirt.org/git/?p=libvirt.git;a=commit;h=366c22f2bcf1ddb8253c123f93
> > fd18d1ba9eacd6)
> > It checks against the version of qemu (i.e. 2.4)  to know if multiqueue is
> > supported or not by qemu.
> > (http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=7971723b985b9adc27122a
> > 3503e7ab38ced2b57f;hp=e7f5510ef2d28ca0ae0ed5751b1fd3018130d6c1)
> > 
> > Dynamically enabling/disabling queue between host/guest is a nice feature
> > to have.
> > But it's not mandatory. You can still configure manually guest and host to use
> > the same number of queues.
> 
> Same number of queues on host and guest can work normally, I have validated it with dpdk.

Try to use upstream dpdk without your patches and upstream qemu (with
patches integrated) and you will see some of the issues I am
talking about: crashes in guest and in dpdk.


> > 
> 
> Maybe we could consider still having this in 2.4,

I think that would be a mistake simply because it affects the
guest/host interface.

I think spec compliance is extremely important. Otherwise guest driver
writers need to study individual implementation bugs and work around
them, and that's just too painful.

virtio spec requires the number of queues to be configurable on the fly,
assuming we can't do that at the moment (and to me, it looks like
there is no way to give the necessary info to dpdk)
we simply must not set the multiqueue capability.

Two main things are broken on the QEMU side:
- MQ feature requires CTRL vq. QEMU does not pass CTRL vq info to DPDK
  so of course it just lies to guest that it's supported:
  all info is buffered in QEMU but stays unused.

- MQ feature requires that max number of queues is reported
  to guest. QEMU does not request this info from DPDK so
  of course it has no way to know this number.
  Instead it just assumes DPDK can handle whatever's thrown at it,
  but naturally this can't work in practice so of course it doesn't.

> And have an enhancement patch set to implement dynamically enabling/disabling in 2.5 or 2.4.x
> After extending the vhost-user spec. 
> 
> Thanks
> Changchun

2.5 development is just around the corner. With enough effort we can
have the patches upstream first thing in 2.5 cycle.

Once there, the whole feature can be backported if enough people
are prepared to dedicate resources to maintaining 2.4.x.
To me this sounds like a much better deal for everyone
than releasing a known-broken device and trying to fix it up.

-- 
MST

  reply	other threads:[~2015-07-09  7:31 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  1:23 [Qemu-devel] [PATCH v5] vhost-user: add multi queue support Ouyang Changchun
2015-07-08 14:29 ` Michael S. Tsirkin
2015-07-08 22:00   ` Maxime Leroy
2015-07-09  1:29     ` [Qemu-devel] [snabb-devel] " Ouyang, Changchun
2015-07-09  7:31       ` Michael S. Tsirkin [this message]
2015-07-09  7:06     ` [Qemu-devel] " Michael S. Tsirkin
2015-07-09 12:00       ` Martin Kletzander
2015-07-09 12:24         ` Maxime Leroy
2015-07-09 12:33           ` Martin Kletzander
2015-07-09 12:54           ` Michael S. Tsirkin
2015-08-12  6:25 ` [Qemu-devel] [PATCH v6 0/2] vhost-user " Ouyang Changchun
2015-08-12  6:25   ` [Qemu-devel] [PATCH v6 1/2] vhost-user: add " Ouyang Changchun
2015-08-13  9:18     ` Michael S. Tsirkin
2015-08-13 10:24       ` Maxime Leroy
2015-08-13 10:55         ` Michael S. Tsirkin
2015-08-25  3:25       ` [Qemu-devel] [snabb-devel] " Ouyang, Changchun
2015-08-27 13:05         ` Michael S. Tsirkin
2015-08-28  1:53           ` Ouyang, Changchun
2015-08-30  6:16             ` Michael S. Tsirkin
2015-08-31  8:29               ` Ouyang, Changchun
2015-08-31 11:30                 ` Michael S. Tsirkin
2015-08-31 15:04                   ` Eric Blake
2015-09-01  9:20                   ` Yuanhan Liu
2015-09-01  9:41                     ` Michael S. Tsirkin
2015-09-01 12:16                       ` Yuanhan Liu
2015-09-01  9:13       ` [Qemu-devel] " Yuanhan Liu
2015-09-01 10:07         ` Michael S. Tsirkin
2015-09-01 12:15           ` Yuanhan Liu
2015-09-01 14:10             ` Michael S. Tsirkin
2015-09-02  5:45               ` Ouyang, Changchun
2015-09-02 12:10                 ` Michael S. Tsirkin
2015-09-07 11:07       ` Marcel Apfelbaum
2015-09-07 12:26         ` Michael S. Tsirkin
2015-09-07 13:08           ` Marcel Apfelbaum
2015-08-12  6:25   ` [Qemu-devel] [PATCH v6 2/2] vhost-user: new protocol feature for multi queue Ouyang Changchun
2015-08-13  9:22     ` Michael S. Tsirkin
2015-08-24  1:50       ` [Qemu-devel] [snabb-devel] " Ouyang, Changchun
2015-09-01  9:16       ` [Qemu-devel] " Yuanhan Liu
2015-09-01 10:09         ` Michael S. Tsirkin
2015-09-01 11:42           ` Yuanhan Liu
2015-08-30 15:28 ` [Qemu-devel] [PATCH v5] vhost-user: add multi queue support Marcel Apfelbaum
2015-08-31  5:28   ` Ouyang, Changchun
2015-08-31  5:42     ` Xu, Qian Q
2015-08-31  8:55       ` Marcel Apfelbaum

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=20150709100645-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=changchun.ouyang@intel.com \
    --cc=luke@snabb.co \
    --cc=marcel.a@redhat.com \
    --cc=n.nikolaev@virtualopensystems.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkhan@redhat.com \
    --cc=snabb-devel@googlegroups.com \
    --cc=thomas.long@intel.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 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.