From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC v1 0/2] vhost: ring format independence
Date: Sat, 12 Oct 2019 15:26:11 -0400 [thread overview]
Message-ID: <20191012152332-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <f650ac1a-6e2a-9215-6e4f-a1095f4a89cd@redhat.com>
On Sat, Oct 12, 2019 at 04:15:42PM +0800, Jason Wang wrote:
>
> On 2019/10/11 下午9:45, Michael S. Tsirkin wrote:
> > So the idea is as follows: we convert descriptors to an
> > independent format first, and process that converting to
> > iov later.
> >
> > The point is that we have a tight loop that fetches
> > descriptors, which is good for cache utilization.
> > This will also allow all kind of batching tricks -
> > e.g. it seems possible to keep SMAP disabled while
> > we are fetching multiple descriptors.
>
>
> I wonder this may help for performance:
Could you try it out and report please?
Would be very much appreciated.
> - another indirection layer, increased footprint
Seems to be offset off by improved batching.
For sure will be even better if we can move stac/clac out,
or replace some get/put user with bigger copy to/from.
> - won't help or even degrade when there's no batch
I couldn't measure a difference. I'm guessing
> - an extra overhead in the case of in order where we should already had
> tight loop
it's not so tight with translation in there.
this exactly makes the loop tight.
> - need carefully deal with indirect and chain or make it only work for
> packet sit just in a single descriptor
>
> Thanks
I don't understand this last comment.
>
> >
> > And perhaps more importantly, this is a very good fit for the packed
> > ring layout, where we get and put descriptors in order.
> >
> > This patchset seems to already perform exactly the same as the original
> > code already based on a microbenchmark. More testing would be very much
> > appreciated.
> >
> > Biggest TODO before this first step is ready to go in is to
> > batch indirect descriptors as well.
> >
> > Integrating into vhost-net is basically
> > s/vhost_get_vq_desc/vhost_get_vq_desc_batch/ -
> > or add a module parameter like I did in the test module.
> >
> >
> >
> > Michael S. Tsirkin (2):
> > vhost: option to fetch descriptors through an independent struct
> > vhost: batching fetches
> >
> > drivers/vhost/test.c | 19 ++-
> > drivers/vhost/vhost.c | 333 +++++++++++++++++++++++++++++++++++++++++-
> > drivers/vhost/vhost.h | 20 ++-
> > 3 files changed, 365 insertions(+), 7 deletions(-)
> >
prev parent reply other threads:[~2019-10-12 19:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 13:45 [PATCH RFC v1 0/2] vhost: ring format independence Michael S. Tsirkin
2019-10-11 13:45 ` [PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct Michael S. Tsirkin
2019-10-12 7:28 ` Jason Wang
2019-10-12 20:27 ` Michael S. Tsirkin
2019-10-14 1:43 ` Jason Wang
2019-10-15 20:20 ` Michael S. Tsirkin
2019-10-16 4:38 ` Jason Wang
2019-10-11 13:46 ` [PATCH RFC v1 2/2] vhost: batching fetches Michael S. Tsirkin
2019-10-12 7:30 ` Jason Wang
2019-10-12 20:36 ` Michael S. Tsirkin
2019-10-14 1:47 ` Jason Wang
2019-10-12 7:31 ` [PATCH RFC v1 0/2] vhost: ring format independence Jason Wang
2019-10-12 20:36 ` Michael S. Tsirkin
2019-10-12 8:15 ` Jason Wang
2019-10-12 19:26 ` Michael S. Tsirkin [this message]
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=20191012152332-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).