Re: [RESEND 2][PATCH 4/4] Modify KVM to update guest time accounting.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Avi Kivity <avi@...>
Cc: Ingo Molnar <mingo@...>, linux-kernel <linux-kernel@...>
Date: Monday, October 15, 2007 - 7:37 am

Avi Kivity wrote:
d
led


IMHO, I think it is better to let kvm_guest_exit() empty (you can remove =
it, if
you want):

1st case:
- unset PF_VCPU in kvm_guest_exit(), all the tick is always for system ti=
me.
Guest time is always 0.

1st case and half:

- like 1st case but we move kvm_guest_exit() as you propose and the reaso=
n of
the interrupt is the tick interrupt. The tick is for guest time only. I t=
hink
the probability is very low.

2nd case:
- don't unset PF_VCPU in kvm_guest_exit(), all the tick is for guest time=
=2E

I proposed a patch allowing to be more accurate, but it introduces more
complexity and system and user time accounting are not very accurate too =
(the
tick if for system if it appears whereas we are in system, for user if it=

appears whereas we are in user).

Laurent
--=20
---------------- Laurent.Vivier@bull.net  -----------------
"Given enough eyeballs, all bugs are shallow" E. S. Raymond
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RESEND 2][PATCH 4/4] Modify KVM to update guest , Christian Borntraeger, (Mon Oct 15, 7:19 am)
Re: [RESEND 2][PATCH 4/4] Modify KVM to update guest time ac..., Laurent Vivier, (Mon Oct 15, 7:37 am)
[PATCH] move kvm_guest_exit() after local_irq_enable(), Laurent Vivier, (Thu Oct 18, 9:19 am)
[PATCH] clear PF_VCPU in kvm_guest_exit(), Laurent Vivier, (Wed Oct 17, 9:08 am)
Use virtual cpu accounting if available for guest times., Christian Borntraeger, (Thu Oct 18, 8:39 am)
Re: [kvm-devel] Use virtual cpu accounting if available for ..., Hollis Blanchard, (Fri Oct 19, 12:57 pm)
Re: [PATCH] clear PF_VCPU in kvm_guest_exit(), Avi Kivity, (Wed Oct 17, 10:16 am)
Re: [PATCH] clear PF_VCPU in kvm_guest_exit(), Laurent Vivier, (Wed Oct 17, 11:09 am)
Re: [PATCH] clear PF_VCPU in kvm_guest_exit(), Christian Borntraeger, (Wed Oct 17, 9:18 am)
Re: [RESEND 2][PATCH 4/4] Modify KVM to update guest , Christian Borntraeger, (Mon Oct 15, 7:33 am)
Re: [RESEND 2][PATCH 4/4] Modify KVM to update guest time ac..., Christian Borntraeger, (Mon Oct 15, 10:39 am)