netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] vhost: support upto 509 memory regions
Date: Tue, 17 Feb 2015 18:09:06 +0100	[thread overview]
Message-ID: <54E375B2.8090101@redhat.com> (raw)
In-Reply-To: <20150217160240.1085e2f7@nial.brq.redhat.com>



On 17/02/2015 16:02, Igor Mammedov wrote:
>> > 
>> > Not if there are about 6 regions, I think.
> When memslots where increased to 509 and look up of them was replaced on
> binary search results were on par with linear search for a default 13 memslots VM.
> 
> Adding LRU

You mean MRU. :)

> cache helped to shave ~40% of cycles for sequential lookup workloads.

It's a bit different for vhost because you can have up to four "things"
being looked up at the same time:

- the s/g list that will end up in the skb

- the avail/used ring

- the virtio buffers

- the virtio indirect buffers

So you probably need multiple MRU caches.  But yes, MRU can help a lot.

Paolo

  reply	other threads:[~2015-02-17 17:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 15:49 [PATCH] vhost: support upto 509 memory regions Igor Mammedov
2015-02-17  9:02 ` Michael S. Tsirkin
2015-02-17 10:59   ` Paolo Bonzini
2015-02-17 12:32     ` Michael S. Tsirkin
2015-02-17 13:11       ` Paolo Bonzini
2015-02-17 13:29         ` Michael S. Tsirkin
2015-02-17 14:11           ` Paolo Bonzini
2015-02-17 15:02           ` Igor Mammedov
2015-02-17 17:09             ` Paolo Bonzini [this message]
2015-02-17 14:44       ` Igor Mammedov
2015-02-17 14:45         ` Paolo Bonzini
2015-02-18  0:53       ` Eric Northup
2015-02-18  4:27         ` Michael S. Tsirkin
2015-05-18 16:22           ` Andrey Korolyov
2015-05-18 16:28             ` Michael S. Tsirkin
2015-05-19 11:50             ` Igor Mammedov

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=54E375B2.8090101@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.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).