Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166411 > unrolled thread

Re: [PATCH 0/5] vhost: support upto 509 memory regions

Started by"Michael S. Tsirkin" <mst@redhat.com>
First post2015-06-16 23:20 +0200
Last post2015-06-17 00:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 0/5] vhost: support upto 509 memory regions "Michael S. Tsirkin" <mst@redhat.com> - 2015-06-16 23:20 +0200
    Re: [PATCH 0/5] vhost: support upto 509 memory regions Igor Mammedov <imammedo@redhat.com> - 2015-06-17 00:20 +0200

#1166411 — Re: [PATCH 0/5] vhost: support upto 509 memory regions

From"Michael S. Tsirkin" <mst@redhat.com>
Date2015-06-16 23:20 +0200
SubjectRe: [PATCH 0/5] vhost: support upto 509 memory regions
Message-ID<pC6qZ-5Yu-3@gated-at.bofh.it>
On Tue, Jun 16, 2015 at 06:33:34PM +0200, Igor Mammedov wrote:
> Series extends vhost to support upto 509 memory regions,
> and adds some vhost:translate_desc() performance improvemnts
> so it won't regress when memslots are increased to 509.
> 
> It fixes running VM crashing during memory hotplug due
> to vhost refusing accepting more than 64 memory regions.
> 
> It's only host kernel side fix to make it work with QEMU
> versions that support memory hotplug. But I'll continue
> to work on QEMU side solution to reduce amount of memory
> regions to make things even better.

I'm concerned userspace work will be harder, in particular,
performance gains will be harder to measure.
How about a flag to disable caching?

> Performance wise for guest with (in my case 3 memory regions)
> and netperf's UDP_RR workload translate_desc() execution
> time from total workload takes:
> 
> Memory      |1G RAM|cached|non cached
> regions #   |  3   |  53  |  53
> ------------------------------------
> upstream    | 0.3% |  -   | 3.5%
> ------------------------------------
> this series | 0.2% | 0.5% | 0.7%
> 
> where "non cached" column reflects trashing wokload
> with constant cache miss. More details on timing in
> respective patches.
> 
> Igor Mammedov (5):
>   vhost: use binary search instead of linear in find_region()
>   vhost: extend memory regions allocation to vmalloc
>   vhost: support upto 509 memory regions
>   vhost: add per VQ memory region caching
>   vhost: translate_desc: optimization for desc.len < region size
> 
>  drivers/vhost/vhost.c | 95 +++++++++++++++++++++++++++++++++++++--------------
>  drivers/vhost/vhost.h |  1 +
>  2 files changed, 71 insertions(+), 25 deletions(-)
> 
> -- 
> 1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1166446

FromIgor Mammedov <imammedo@redhat.com>
Date2015-06-17 00:20 +0200
Message-ID<pC7n4-7jm-15@gated-at.bofh.it>
In reply to#1166411
On Tue, 16 Jun 2015 23:16:07 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Tue, Jun 16, 2015 at 06:33:34PM +0200, Igor Mammedov wrote:
> > Series extends vhost to support upto 509 memory regions,
> > and adds some vhost:translate_desc() performance improvemnts
> > so it won't regress when memslots are increased to 509.
> > 
> > It fixes running VM crashing during memory hotplug due
> > to vhost refusing accepting more than 64 memory regions.
> > 
> > It's only host kernel side fix to make it work with QEMU
> > versions that support memory hotplug. But I'll continue
> > to work on QEMU side solution to reduce amount of memory
> > regions to make things even better.
> 
> I'm concerned userspace work will be harder, in particular,
> performance gains will be harder to measure.
it appears so, so far.

> How about a flag to disable caching?
I've tried to measure cost of cache miss but without much luck,
difference between version with cache and with caching removed
was within margin of error (±10ns) (i.e. not mensurable on my
5min/10*10^6 test workload).
Also I'm concerned about adding extra fetch+branch for flag
checking will make things worse for likely path of cache hit,
so I'd avoid it if possible.

Or do you mean a simple global per module flag to disable it and
wrap thing in static key so that it will be cheap jump to skip
cache?
 
> > Performance wise for guest with (in my case 3 memory regions)
> > and netperf's UDP_RR workload translate_desc() execution
> > time from total workload takes:
> > 
> > Memory      |1G RAM|cached|non cached
> > regions #   |  3   |  53  |  53
> > ------------------------------------
> > upstream    | 0.3% |  -   | 3.5%
> > ------------------------------------
> > this series | 0.2% | 0.5% | 0.7%
> > 
> > where "non cached" column reflects trashing wokload
> > with constant cache miss. More details on timing in
> > respective patches.
> > 
> > Igor Mammedov (5):
> >   vhost: use binary search instead of linear in find_region()
> >   vhost: extend memory regions allocation to vmalloc
> >   vhost: support upto 509 memory regions
> >   vhost: add per VQ memory region caching
> >   vhost: translate_desc: optimization for desc.len < region size
> > 
> >  drivers/vhost/vhost.c | 95
> > +++++++++++++++++++++++++++++++++++++--------------
> > drivers/vhost/vhost.h |  1 + 2 files changed, 71 insertions(+), 25
> > deletions(-)
> > 
> > -- 
> > 1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web