Re: nice value is ignored on cpu time accounting of a guest?

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

 



On Tue, Oct 20, 2009 at 4:34 PM, Avi Kivity <avi@xxxxxxxxxx> wrote:
> On 10/20/2009 04:27 PM, Ryota Ozaki wrote:

>> Well, like this?
>>
>>         /* Add user time to cpustat. */
>>         tmp = cputime_to_cputime64(cputime);
>>         if (TASK_NICE(p)>  0) {
>>                 cpustat->nice = cputime64_add(cpustat->nice, tmp);
>>                 cpustat->guest_nice = cputime64_add(cpustat->guest_nice,
>> tmp);
>>         } else {
>>                 cpustat->user = cputime64_add(cpustat->user, tmp);
>>                 cpustat->guest = cputime64_add(cpustat->guest, tmp);
>>         }
>>
>
> In account_guest_time()?  Yes.

Yes.

OK, I'll send a patch later. Thanks!

  ozaki-r
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux