Re: [kvm-devel] Use virtual cpu accounting if available for guest times.

2007-10-19 Thread Hollis Blanchard
On Fri, 2007-10-19 at 11:57 -0500, Hollis Blanchard wrote: > > @@ -669,11 +670,13 @@ __init void kvm_arch_init(void); > > > > static inline void kvm_guest_enter(void) > > { > > + account_system_vtime(current); > > current->flags |= PF_VCPU; > > } > > > > static inline void

Re: [kvm-devel] Use virtual cpu accounting if available for guest times.

2007-10-19 Thread Hollis Blanchard
On Thu, 2007-10-18 at 14:39 +0200, Christian Borntraeger wrote: > Avi, > > ppc and s390 offer the possibility to track process times precisely > by looking at cpu timer on every context switch, irq, softirq etc. > We can use that infrastructure as well for guest time accounting. > We need to

Re: [kvm-devel] Use virtual cpu accounting if available for guest times.

2007-10-19 Thread Hollis Blanchard
On Fri, 2007-10-19 at 11:57 -0500, Hollis Blanchard wrote: @@ -669,11 +670,13 @@ __init void kvm_arch_init(void); static inline void kvm_guest_enter(void) { + account_system_vtime(current); current-flags |= PF_VCPU; } static inline void kvm_guest_exit(void) { +

Re: [kvm-devel] Use virtual cpu accounting if available for guest times.

2007-10-19 Thread Hollis Blanchard
On Thu, 2007-10-18 at 14:39 +0200, Christian Borntraeger wrote: Avi, ppc and s390 offer the possibility to track process times precisely by looking at cpu timer on every context switch, irq, softirq etc. We can use that infrastructure as well for guest time accounting. We need to account