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: cpufreq/PowerNow! in Xen: Time and platform

To: "Langsdorf, Mark" <mark.langsdorf@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] 1/2: cpufreq/PowerNow! in Xen: Time and platform changes
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Thu, 30 Aug 2007 16:56:24 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 30 Aug 2007 13:57:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1449F58C868D8D4E9C72945771150BDF0207700B@xxxxxxxxxxxxxxxxx>
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>
Organization: Red Hat, Inc
References: <C2FC9B0B.150B9%keir@xxxxxxxxxxxxx> <46D70B20.2010108@xxxxxxxxxx> <1449F58C868D8D4E9C72945771150BDF0207700B@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20061008)
Langsdorf, Mark wrote:
Here is the missing piece of the puzzle.   A platform
hypercall operation to get system wide idle time.

I believe Mark's changes, together with this little
patch, are the way we can get cpufreq working on
Xen with the minimal amount of code duplication.

Duplicating code anywhere, whether it be inside the
hypervisor or in some Xen-only userland package, will
only lead to bit rot and make Xen maintenance more
painful.

This code looks like it returns the amount of time
spent in the running runstate, not the idle time.
Am I completely missing something?

It is the time that the CPU's _idle domain_ has
spent in RUNSTATE_running.  This corresponds to
the idle time on each physical CPU.

For reference, the ondemand governor calculates
idle time as the sum of cpustat.idle and cpustat.iowait.
I'd think the equivalent would be the sum of
RUNSTATE_runnable and RUNSTATE_blocked.

The hypervisor has no concept of iowait on a
physical CPU basis.  It only tracks domain
VCPUs and the idle domain VCPUs.

Since the idle domain VCPUs never migrate
between CPUs, they reflect physical CPU idle
time.

--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is.  Each group
calls the other unpatriotic.

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

<Prev in Thread] Current Thread [Next in Thread>