WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 1/2] cpu steal time accounting

On Wed, 22 Feb 2006, Keir Fraser wrote:

> But the 'vcpu_time' you read out of Xen excludes time spent
> blocked/unrunnable. Won't you end up accounting  that as it it were
> involuntary preemption? Also:

If the domain is unrunnable, surely there won't be a
process on the virtual cpu that is runnable?  Or am
I overlooking something here?

>  1. What if a guest gets preempted for lots of short time periods (less 
> than a jiffy). Then some arbitrary time in the future is preempted for 
> long enough to activate you stolen-time logic. Won't you end up 
> incorrectly accounting the accumulated short time periods?

This is true.  I'm not sure we'd want to get the vcpu info
at every timer interrupt though, that could end up being
too expensive...

>  2. Is the Xen provided 'vcpu_time', divided down into jiffies, even 
> comparable with the kstats that you sum? What about accumulated rounding 
> errors in 'vcpu_time' and the kstats causing relative drift between them 
> over time?

In the tests I ran the steal time seemed to work out quite
well with what I expected it to be, watching /proc/stat from
inside the guest and xentop from dom0 simultaneously.

The rounding errors happen occasionally (I added printks to
the if statements catching them), but not all that often...

-- 
All Rights Reversed

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel