From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: Xen timing mode Date: Tue, 23 Feb 2010 12:28:26 -0800 Message-ID: <4B843A6A.5050102@goop.org> References: <5c3550fe1002230912j1a5d0650oa1e355652c8e3062@mail.gmail.com> <5c3550fe1002230929r37d1bd73mdd82fc84ee51d0fd@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5c3550fe1002230929r37d1bd73mdd82fc84ee51d0fd@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Priya Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 02/23/2010 09:29 AM, Priya wrote: > The Xen Interface manual for Xen v2.0 (attached) Page 4 defines Domain > - virtual time as > > " The time that progresses at the same pace as system time, but only > while a domain is executing -- it stops while a domain is > de-scheduled. Therefore the share of the CPU that a domain receives is > indicated by the rate at which its virtual time increases." > > I am interesting in finding out if any of the timing system > calls/instructions like gettimeofday(), hwclock(), rdtsc() can read > this domain virtual time. /proc/stat publishes stolen time for each vcpu (second-last column on the "cpuX" lines); you can subtract that from monotonic time to work out how much vcpu the domain has got. J