On Sun, 2011-01-30 at 15:16 +0200, Avi Kivity wrote:
On 01/28/2011 09:52 PM, Glauber Costa wrote:
Register steal time within KVM. Everytime we sample the steal time
information, we update a local variable that tells what was the
last time read. We then account the difference.
On Tue, 2011-02-01 at 13:53 -0200, Glauber Costa wrote:
And since the granularity of the cpu accounting is too coarse, we end up
with much more steal time than we should, because things that are less
than 1 unity of cputime, are often rounded up to 1 unity of cputime.
See, that! is the
See, that! is the problem, don't round up like that.
Yeah, I was using usecs_to_cputime(), believing this was the standard
interface. By the way, one of the things that also led to better results
were just forcing it to 0 every time we had steal == 1 in the end. But
*that* was a real hack =)
On Tue, 2011-02-01 at 15:00 -0200, Glauber Costa wrote:
What you can do is: steal_ticks = steal_time_clock() / TICK_NSEC, or
simply keep a steal time delta and every time it overflows
cputime_one_jiffy insert a steal-time tick.
What do you think about keeping accounting in msec/usec
On Tue, Feb 1, 2011 at 9:44 AM, Peter Zijlstra pet...@infradead.org wrote:
On Tue, 2011-02-01 at 15:00 -0200, Glauber Costa wrote:
What you can do is: steal_ticks = steal_time_clock() / TICK_NSEC, or
simply keep a steal time delta and every time it overflows
cputime_one_jiffy insert a
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote:
+ /*
+* using nanoseconds introduces noise, which accumulates easily
+* leading to big steal time values. We want, however, to keep the
+* interface nanosecond-based for future-proofness. The hypervisor may
On 01/28/2011 09:52 PM, Glauber Costa wrote:
Register steal time within KVM. Everytime we sample the steal time
information, we update a local variable that tells what was the
last time read. We then account the difference.
static void kvm_guest_cpu_offline(void *dummy)
{
Register steal time within KVM. Everytime we sample the steal time
information, we update a local variable that tells what was the
last time read. We then account the difference.
Signed-off-by: Glauber Costa glom...@redhat.com
CC: Rik van Riel r...@redhat.com
CC: Jeremy Fitzhardinge
On 01/28/2011 02:52 PM, Glauber Costa wrote:
Register steal time within KVM. Everytime we sample the steal time
information, we update a local variable that tells what was the
last time read. We then account the difference.
Signed-off-by: Glauber Costaglom...@redhat.com
CC: Rik van