Re: [v6] kvm/fpu: Enable fully eager restore kvm FPU

From: Paolo Bonzini
Date: Fri Apr 24 2015 - 03:55:49 EST




On 24/04/2015 09:46, Zhang, Yang Z wrote:
> > On the other hand vmexit is lighter and lighter on newer processors; a
> > Sandy Bridge has less than half the vmexit cost of a Core 2 (IIRC 1000
> > vs. 2500 clock cycles approximately).
>
> 1000 cycles? I remember it takes about 4000 cycle even in HSW server.

I was going from memory, but I now measured it with the vmexit test of
kvm-unit-tests. With both SNB Xeon E5 and IVB Core i7, returns about
1400 clock cycles for a vmcall exit. This includes the overhead of
doing the cpuid itself.

Thus the vmexit cost is around 1300 cycles. Of this the vmresume
instruction is probably around 800 cycles, and the rest is introduced by
KVM. There are at least 4-5 memory barriers and locked instructions.

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