qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Eric Blake <eblake@redhat.com>
Cc: jasowang@redhat.com, mst@redhat.com, qemu-devel@nongnu.org,
	changchun.ouyang@intel.com
Subject: Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support
Date: Wed, 16 Sep 2015 10:48:42 +0800	[thread overview]
Message-ID: <20150916024842.GB6247@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <20150916020656.GD2339@yliu-dev.sh.intel.com>

On Wed, Sep 16, 2015 at 10:06:56AM +0800, Yuanhan Liu wrote:
> On Tue, Sep 15, 2015 at 09:02:07AM -0600, Eric Blake wrote:
> > On 09/15/2015 01:10 AM, Yuanhan Liu wrote:
> > > From: Changchun Ouyang <changchun.ouyang@intel.com>
> > > 
> > > This patch is initially based a patch from Nikolay Nikolaev.
> > > 
> > > Here is the latest version for adding vhost-user multiple queue support,
> > > by creating a nc and vhost_net pair for each queue.
> > 
> > The phrase "Here is the latest version" doesn't make much sense in the
> > long term in git (that is, a year from now, we won't care how many
> > preliminary versions there were, just about the version that got
> > committed; and if anything in git changes after that point, it is no
> > longer the latest version).
> 
> Yeah, good point.
> 
> > 
> > > 
> > > Qemu exits if find that the backend can't support number of requested
> > > queues(by providing queues=# option). The max number is queried by a
> > 
> > space before ( in English.
> 
> Michael reminded me behore, and sorry for making such mistake again.
> 
> And thanks for other typo corrections.
> 
> > 
> > > new message, VHOST_USER_GET_QUEUE_NUM, and is sent only when protocol
> > > feature VHOST_USER_PROTOCOL_F_MQ is present first.
> > > 
> > > The max queue check is done at vhost-user initiation stage. We initiate
> > > one queue first, which, in the meantime, also gets the max_queues the
> > > backend supports.
> > > 
> > > In older version, it was reported that some messages are sent more times
> > > than necessary. Here we came an agreement with Michael that we could
> > > categorize vhost user messages to 2 types: none-vring specific messages,
> > 
> > s/none/non/
> > 
> > > which should be sent only once, and vring specific messages, which should
> > > be sent per queue.
> > > 
> > > Here I introduced a helper function vhost_user_one_time_request(), which
> > > lists following messages as none-vring specific messages:
> > 
> > s/none/non/
> > 
> > > 
> > >         VHOST_USER_GET_FEATURES
> > >         VHOST_USER_SET_FEATURES
> > >         VHOST_USER_GET_PROTOCOL_FEATURES
> > >         VHOST_USER_SET_PROTOCOL_FEATURES
> > >         VHOST_USER_SET_OWNER
> > >         VHOST_USER_RESET_DEVICE
> > >         VHOST_USER_SET_MEM_TABLE
> > >         VHOST_USER_GET_QUEUE_NUM
> > > 
> > > For above messages, we simply ignore them when they are not sent the first
> > > time.
> > > 
> > 
> > Up to here is mostly fine for the commit message.  Meanwhile...
> > 
> > > v9: per suggested by Jason Wang, we could invoke qemu_chr_add_handlers()
> > >     once only, and invoke qemu_find_net_clients_except() at the handler
> > >     to gather all related ncs, for initiating all queues. Which addresses
> > >     a hidden bug in older verion in a more QEMU-like way.
> > > 
> > > v8: set net->dev.vq_index correctly inside vhost_net_init() based on the
> > >     value from net->nc->queue_index.
> > 
> > ...this chunk here is useful only on the mailing list, and not in git,
> > and therefore, should appear...
> 
> Sorry that I may disagree here.
> 
> First of all, it does no harm at all to include few old version
> descriptions. Instead, it may give some hints to the reader how
> the patch evolves. Meanwhile, you will find they are quite common
> in some well known open source projects, such as linux kernel:
> 
>     [yliu@yliu-dev ~/linux]$ git log | grep '\<[vV][1-9][0-9]*:' | wc -l
>     10828
> 
> You can find them at qemu project (though not that common), too:
> 
>     [yliu@yliu-dev ~/qemu]$ git log | grep '\<[vV][1-9][0-9]*:' | wc -l
>     390
> 
> So, if it's a qemu community specific culture, I could do what
> you suggested.
> 
> If not, I'd like to put them into the commit log, as putting it
> outside the commit log gives unnecessary extra burden to patch
> author when he need update several version change information
> in a patch set: he has to format the patch set first, and add
> them one by one by editing those patches.

Oops, I just found we can do that while editing the commit log (IIRC,
I had a similar try long time ago, and it seems it didn't work).

	--yliu

  reply	other threads:[~2015-09-16  2:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15  7:10 [Qemu-devel] [PATCH 0/7 v9] vhost-user multiple queue support Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 1/2] vhost-user: add multiple queue support Yuanhan Liu
2015-09-15 14:56   ` Eric Blake
2015-09-16  2:07     ` Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 2/7] vhost-user: add protocol feature negotiation Yuanhan Liu
2015-09-17  7:12   ` Jason Wang
2015-09-17  7:20     ` Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 5/7] vhost: introduce vhost_backend_get_vq_index method Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support Yuanhan Liu
2015-09-15 15:02   ` Eric Blake
2015-09-16  2:06     ` Yuanhan Liu
2015-09-16  2:48       ` Yuanhan Liu [this message]
2015-09-16  8:10       ` Michael S. Tsirkin
2015-09-16  8:23         ` Yuanhan Liu
2015-09-16 14:15       ` Eric Blake
2015-09-16 14:53         ` Yuanhan Liu
2015-09-15  7:10 ` [Qemu-devel] [PATCH 7/7] vhost-user: add a new message to disable/enable a specific virt queue Yuanhan Liu
2015-09-16  8:12 ` [Qemu-devel] [PATCH 0/7 v9] vhost-user multiple queue support Michael S. Tsirkin
2015-09-16  8:17   ` Yuanhan Liu
2015-09-16 11:39 ` Marcel Apfelbaum
2015-09-16 12:23   ` Yuanhan Liu
2015-09-16 14:06     ` Marcel Apfelbaum
2015-09-17 12:23 ` Michael S. Tsirkin
2015-09-18  1:18   ` Yuanhan Liu
  -- strict thread matches above, loose matches on Subject: below --
2015-09-08  7:38 [Qemu-devel] [PATCH 0/7 v7] " Yuanhan Liu
2015-09-08  7:38 ` [Qemu-devel] [PATCH 6/7] vhost-user: add " Yuanhan Liu
2015-09-08 21:22   ` Eric Blake
2015-09-09  1:47     ` Yuanhan Liu
2015-09-09  8:05   ` Ouyang, Changchun
2015-09-09  8:11     ` Yuanhan Liu
2015-09-09 12:18   ` Michael S. Tsirkin
2015-09-09 13:19     ` Yuanhan Liu
2015-09-09 20:55   ` Michael S. Tsirkin
2015-09-14 10:00   ` Jason Wang
2015-09-15  2:15     ` Yuanhan Liu

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=20150916024842.GB6247@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=changchun.ouyang@intel.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).