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

From: Zhang, Yang Z
Date: Fri Apr 24 2015 - 04:09:23 EST


Paolo Bonzini wrote on 2015-04-24:
>
>
> 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.

Yes, that's make sense. The average vmexit/vmentry handle cost is around 4000 cycles. But I guess xsaveopt doesn't take so many cycles. Does anyone have the xsaveopt cost data?

>
> Paolo


Best regards,
Yang


--
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/