Re: [kvm-devel] [PATCH 0/2][KVM] guest time accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Borntraeger wrote:
> Am Montag, 13. August 2007 schrieb Laurent Vivier:
>>>> As guest accounting is hw dependent, I think we should add a hook in the
>>>> accounting functions.
>>>>   
>>> Isn't PF_VM exactly such a hook?  All the hypervisor needs to do is to
>>> set/unset it correctly?
>> In fact, no.
>>
>> PF_VM is used to know we have entered a virtual CPU (the hypervisor set it,
>> the scheduler unset it on accounting)
> 
> Why not do something like the following. (This patch does not work as it 
> relies on the no-existing var cputime_since_last_update, but it shows the 
> idea)

Yes, I think it is a really good idea, much more cleaner.

But doing like that you can have cpustat->system decreasing and thus negative
values in "top".

It is why I modify account_system_time() (see my last patch) to decrease the
value to add to system time accordingly the value we add in cpustat->guest, and
thus system time never decreases. We cannot do that when we call
account_system_time() from KVM part.

Laurent
-- 
------------- [email protected]  --------------
          "Software is hard" - Donald Knuth

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux