On Sat, Jul 5, 2008 at 8:40 PM, Mulyadi Santosa <[EMAIL PROTECTED]>
wrote:

> Guessing..
>
> On Thu, Jul 3, 2008 at 11:19 PM, Peter Teoh <[EMAIL PROTECTED]>
> wrote:
> > http://lkml.org/lkml/2007/1/5/213
> >
> > Question here is:   what is CR3 caching?  (few first line of email)?
>
> probably it means it is stored in somekind of "fake" CR3 register. As
> you know that storing/reading something to/from RAM is expensive
> compared to accessing registers, so if you can "cache" them in
> register, it would be damn faster...
>
> Note, that's VT feature...meaning it is used for virtualization. That
> makes sense, because vm exit/enter might happen so many times....and
> that includes switching between many CR3 furiously....multiple times
> more frequently than normal context switching between processes.
>

Hello,
         From Ingo Molnar's mail (which starts that thread), what i could
infer is:
As Mulyadi states, CR3 caching is used during  virtualization. Normally, any
change in CR3 would cause a switch out of the VMX mode into the hypervisor.
But, Intel seems to have employed a 4 entried cache which can be made to
store CR3 values for processes running in the guest. If, the changed CR3
value is one of the 4 in the 'CR3 target cache' then, an expensive VM exit
to the hypervisor is avoided.
This is how, i guess, the KVM trunk+paravirt/c3 performance is 'faster by a
factor of 4' as compared to KVM trunk for 2 tasks and, decreases by a
considerable amount for more than 4 tasks.

HTH. Kindly CMIIW.

Best regards,
Pranav

Reply via email to