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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/2] cpu steal time accounting
From: Dan Hecht <dhecht@xxxxxxxxxx>
Date: Thu, 23 Feb 2006 10:17:11 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 23 Feb 2006 18:19:07 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <259022e94a98f0f5df18a1fe678ccb89@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <43FCCB2C.5000408@xxxxxxxxxx> <43FCFA9F.8080407@xxxxxxxxxx> <259022e94a98f0f5df18a1fe678ccb89@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5 (X11/20051201)
Keir Fraser wrote:

On 22 Feb 2006, at 23:58, Dan Hecht wrote:

To solve this, it may be best to have the hypervisor interface expose per-vcpu stolen time directly, rather than vcpu_time. Then the guest does not need to try to guess whether to charge (system_time - vcpu_time) against idle or steal.

Yes, the distinction between stolen and available time does makes sense (although I'm not sure 'available' is a great name)

The term "available" came from looking at it from the perspective of the vcpu, rather than the hypervisor. To the vcpu, the time that it's running or halted is, in a sense, "available" to it (even though, (as an optimization) the hypervisor might use the pcpu to do something else when the vcpu is halted). But, anytime the hypervisor forces the vcpu to wait involuntarily, the time is no longer "available" to it, but stolen.

Said another way, on native hardware, stolen time is zero. All time is "available" to the OS. Though it might choose to halt for some of this time, the time is still "available".

otherwise you can't account for wakeup latencies. account_steal_time() would need to be modified in Linux, though, as we would not need its dodgy heuristic for deciding whether to account to stolen time or iowait/idle.


Exactly. We slightly refactor the account_steal_time() interface to have an interface that bypasses the heuristic.

Dan

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