linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: mst@redhat.com, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: wexu@redhat.com, peterx@redhat.com, vkaplans@redhat.com,
	maxime.coquelin@redhat.com
Subject: Re: [PATCH V2] vhost: introduce O(1) vq metadata cache
Date: Wed, 15 Feb 2017 13:37:17 +0800	[thread overview]
Message-ID: <ab222583-17ac-a4fb-0547-487caa8b866d@redhat.com> (raw)
In-Reply-To: <1481709237-19827-1-git-send-email-jasowang@redhat.com>



On 2016年12月14日 17:53, Jason Wang wrote:
> When device IOTLB is enabled, all address translations were stored in
> interval tree. O(lgN) searching time could be slow for virtqueue
> metadata (avail, used and descriptors) since they were accessed much
> often than other addresses. So this patch introduces an O(1) array
> which points to the interval tree nodes that store the translations of
> vq metadata. Those array were update during vq IOTLB prefetching and
> were reset during each invalidation and tlb update. Each time we want
> to access vq metadata, this small array were queried before interval
> tree. This would be sufficient for static mappings but not dynamic
> mappings, we could do optimizations on top.
>
> Test were done with l2fwd in guest (2M hugepage):
>
>     noiommu  | before        | after
> tx 1.32Mpps | 1.06Mpps(82%) | 1.30Mpps(98%)
> rx 2.33Mpps | 1.46Mpps(63%) | 2.29Mpps(98%)
>
> We can almost reach the same performance as noiommu mode.
>
> Signed-off-by: Jason Wang<jasowang@redhat.com>
> ---
> Changes from V1:
> - silent 32bit build warning

ping

  reply	other threads:[~2017-02-15  5:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  9:53 [PATCH V2] vhost: introduce O(1) vq metadata cache Jason Wang
2017-02-15  5:37 ` Jason Wang [this message]
2017-02-27 18:35   ` Michael S. Tsirkin
2017-02-28  3:23     ` Jason Wang

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=ab222583-17ac-a4fb-0547-487caa8b866d@redhat.com \
    --to=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peterx@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=vkaplans@redhat.com \
    --cc=wexu@redhat.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 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).