Re: [PATCH] Lazy FPU for SVM

Avi Kivity
2007-04-24T14:32:58Z

Anthony Liguori wrote:
> Avi Kivity wrote:
>> Anthony Liguori wrote:
>>
>> [updated patch]
>>
>> Applied.
>>
>>
>>> Hard to say exactly because of the noise. I did two runs of 4
>>> test/vmexit:
>>>
>>> Before 4091, 4194, 4559, 4439
>>> After: 3979, 4324, 3918, 3910
>>>
>>> So there's definitely a speedup, but probably only 100-200 cycles.
>>>
>>>
>>
>> Running on an idle, headless server with the vcpu pinned reduces
>> variability to a few cycles in the after case. Strangely, the
>> variability is high in the before case. I get a similar disappointing
>> result of 100-200 cycles.
>>
>
> I previously measured how long fx_save/fx_restore took and it was
> right around 150 cycles on AMD.

Well, we're calling it twice per vmexit.

A save/restore pair is 313 cycles on a Woodcrest; two of those make 626
out of ~4000 cycles should get us a nice 15% gain.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.