lkml.org 
[lkml]   [2020]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] KVM: SVM: use vmsave/vmload for saving/restoring additional host state
On Wed, Dec 16, 2020 at 04:23:22PM +0100, Paolo Bonzini wrote:
> On 16/12/20 16:12, Michael Roth wrote:
> > It looks like it does save us ~20-30 cycles vs. vmload, but maybe not
> > enough to justify the added complexity. Additionally, since we still
> > need to call vmload when we exit to userspace, it ends up being a bit
> > slower for this particular workload at least. So for now I'll plan on
> > sticking to vmload'ing after vmexit and moving that to the asm code
> > if there are no objections.
>
> Yeah, agreed. BTW you can use "./x86/run x86/vmexit.flat" from
> kvm-unit-tests to check the numbers for a wide range of vmexit paths.

Wasn't aware of that, this looks really useful. Thanks!

>
> Paolo
>
> > current v2 patch, sample 1
> > ioctl entry: 1204722748832
> > pre-run: 1204722749408 ( +576)
> > post-run: 1204722750784 (+1376)
> > ioctl exit: 1204722751360 ( +576)
> > total cycles: 2528
> >
> > current v2 patch, sample 2
> > ioctl entry: 1204722754784
> > pre-vmrun: 1204722755360 ( +576)
> > post-vmrun: 1204722756720 (+1360)
> > ioctl exit: 1204722757312 ( +592)
> > total cycles 2528
> >
> > wrgsbase, sample 1
> > ioctl entry: 1346624880336
> > pre-vmrun: 1346624880912 ( +576)
> > post-vmrun: 1346624882256 (+1344)
> > ioctl exit: 1346624882912 ( +656)
> > total cycles 2576
> >
> > wrgsbase, sample 2
> > ioctl entry: 1346624886272
> > pre-vmrun: 1346624886832 ( +560)
> > post-vmrun: 1346624888176 (+1344)
> > ioctl exit: 1346624888816 ( +640)
> > total cycles: 2544
> >
>

\
 
 \ /
  Last update: 2020-12-16 18:10    [W:0.041 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site