]> git.baikalelectronics.ru Git - kernel.git/commit
KVM guest: Steal time accounting
authorGlauber Costa <glommer@redhat.com>
Mon, 11 Jul 2011 19:28:17 +0000 (15:28 -0400)
committerAvi Kivity <avi@redhat.com>
Thu, 14 Jul 2011 09:59:46 +0000 (12:59 +0300)
commite9d126fa32f6c9eff8cad1a08fbe6bdbf1aad078
tree8d274b61c6011ad4d5844f2fdc15459b8216cc90
parent3d2700c6faedd0df63590b2e3913bab58ef2dfc0
KVM guest: Steal time accounting

This patch accounts steal time time in account_process_tick.
If one or more tick is considered stolen in the current
accounting cycle, user/system accounting is skipped. Idle is fine,
since the hypervisor does not report steal time if the guest
is halted.

Accounting steal time from the core scheduler give us the
advantage of direct acess to the runqueue data. In a later
opportunity, it can be used to tweak cpu power and make
the scheduler aware of the time it lost.

[avi: <asm/paravirt.h> doesn't exist on many archs]

Signed-off-by: Glauber Costa <glommer@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Eric B Munson <emunson@mgebm.net>
CC: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
CC: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
kernel/sched.c