From mboxrd@z Thu Jan 1 00:00:00 1970 From: Priya Subject: Re: Xen timing mode Date: Tue, 23 Feb 2010 12:33:19 -0500 Message-ID: <5c3550fe1002230933y37d92ac1te95d3407ae990657@mail.gmail.com> References: <5c3550fe1002230912j1a5d0650oa1e355652c8e3062@mail.gmail.com> <5c3550fe1002230929r37d1bd73mdd82fc84ee51d0fd@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0111706682==" 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: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0111706682== Content-Type: multipart/alternative; boundary=00504502b51a1b5ee8048047f260 --00504502b51a1b5ee8048047f260 Content-Type: text/plain; charset=ISO-8859-1 The latest interface manual which contains a similar definition of domain-virtual time as stated in my last email can be found here: http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/interface/interface.html#SECTION00340000000000000000 Priya On Tue, Feb 23, 2010 at 12:29 PM, 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. > > Thanks, again ! > > PS: I could not find a similar documentation for Xen v3.0 or later > > > > On Tue, Feb 23, 2010 at 12:18 PM, Keir Fraser wrote: > >> What do you mean by domain - virtual time? >> >> >> On 23/02/2010 17:12, "Priya" wrote: >> >> > Thanks ! >> > >> > In that case, how does a para-virtualized user domain find the domain - >> > virtual time ? >> > >> > --Priya >> > >> > On Tue, Feb 23, 2010 at 12:08 PM, Keir Fraser < >> keir.fraser@eu.citrix.com> >> > wrote: >> >> Independent_wallclock is specific to Linux PV guests, and is set within >> the >> >> guest. Timer_mode is specific to HVM guests and is a domain build-time >> >> config option. >> >> >> >> -- Keir >> >> >> >> On 23/02/2010 16:50, "PBhat" wrote: >> >> >> >>> >> >>> A question about timing modes in Xen came up after reading the >> documentation >> >>> on >> >>> >> http://wiki.xensource.com/xenwiki/XenConfigurationFileOptions?highlight=(int >> >>> er >> >>> < >> http://wiki.xensource.com/xenwiki/XenConfigurationFileOptions?highlight=%28 >> >>> inter> >> >>> rupts)|(timer) >> >>> configuration file options and I was wondering if you could help me >> with >> >>> it. >> >>> >> >>> * I know that Xen has a facility on the user domains to change the >> >>> timing from something called the ' >> http://openskill.info/infobox.php?ID=1451 >> >>> independent wallclock ' to 'dependent clock' and vice versa. The way >> to do >> >>> this is to toggle the parameter /proc/sys/xen/independent_wallclock >> between >> >>> 0 (dependent) and 1 (independent) >> >>> >> >>> >> >>> * Now, the documentation on the configuration options for xen >> virtual >> >>> machine under the heading of Timers contains no mention of the above >> >>> mentioned facility, but instead talks about something called a >> 'timer_mode' >> >>> >> >>> >> >>> timer_mode: Timer mode (0=delay virtual time when ticks are missed; >> >>> 1=virtual time is always wallclock time >> >>> timer_mode (default=1; Value='TIMER_MODE') >> >>> >> >>> Now my question is whether the timer mode = 1 is equivalent to >> independent_ >> >>> wallclock? >> >>> >> >>> I think the answer is no. While timer_mode = 1 decides whether the >> virtual >> >>> machine is able to read the Domain-0 time, the independent_wallclock >> decides >> >>> whether you need NTP sychronization on both (user and control) domains >> or >> >>> not. >> >>> >> >>> Namely, in the timer_mode = 1, the gettimeofday() called from the >> virtual >> >>> machine will return the domain virtual time, but time_mode = 0 >> >>> gettimeofday() instruction from the virtual machine will return the >> system >> >>> time. >> >>> >> >>> The independent and dependent modes have an effect on whether the >> virtual >> >>> machines can use the NTP or any other synchronization of Domain-0. >> >>> >> >>> Is my understanding correct? >> >>> >> >>> I further want to know whether the working remains similar on Xen HVMs >> also. >> >>> In the sense that are Hardware based virtual machines capable of >> reading the >> >>> Domain-0 system time in an analogous way? >> >>> >> >>> >> >>> Your help would be much appreciated. I am new to this area and I >> apologize >> >>> if my questions seem too basic. >> >> >> >> >> >> >> > >> > >> >> >> >> > --00504502b51a1b5ee8048047f260 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The latest interface manual which contains a similar definition of domain-v= irtual time as stated in my last email can be found here:

http://www.cl.cam.ac.uk/research/srg/= netos/xen/readmes/interface/interface.html#SECTION00340000000000000000<= br>
Priya

On Tue, Feb 23, 2010 at 12:29 P= M, Priya <pbhat@= acis.ufl.edu> wrote:
The Xen Interface manual for Xen v2.0 (attached) Page 4 defines Domain - vi= rtual 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.

Thanks, again !

PS: I could not find a similar documentation for Xen= v3.0 or later



On Tue, Feb 23, 2010 at 12:18 PM, Keir Fraser <keir.fr= aser@eu.citrix.com> wrote:
What do you mean = by domain - virtual time?


On 23/02/2010 17:12, "Priya" <pbhat@acis.ufl.edu> wrote:

> Thanks !
>
> In that case, how does a para-virtualized user domain find the domain = -
> virtual time ?
>
> --Priya
>
> On Tue, Feb 23, 2010 at 12:08 PM, Keir Fraser <keir.fraser@eu.citrix.com>= ;
> wrote:
>> Independent_wallclock is specific to Linux PV guests, and is set w= ithin the
>> guest. Timer_mode is specific to HVM guests and is a domain build-= time
>> config option.
>>
>> =A0-- Keir
>>
>> On 23/02/2010 16:50, "PBhat" <pbhat@acis.ufl.edu> wrote:
>>
>>>
>>> A question about timing modes in Xen came up after reading the= documentation
>>> on
>>> http://wiki.xensource.com/= xenwiki/XenConfigurationFileOptions?highlight=3D(int
>>> er
>>> <http://wiki.xensour= ce.com/xenwiki/XenConfigurationFileOptions?highlight=3D%28
>>> inter>
>>> rupts)|(timer)
>>> configuration file options =A0and I was wondering if you could= help me with
>>> it.
>>>
>>> =A0 =A0 * I know that Xen has a facility on the user domains t= o change the
>>> timing from something called the ' http://openskill.info/in= fobox.php?ID=3D1451
>>> independent wallclock ' to 'dependent clock' and v= ice versa. The way to do
>>> this is to toggle the parameter /proc/sys/xen/independent_wall= clock between
>>> 0 (dependent) and 1 (independent)
>>>
>>>
>>> =A0 =A0 * Now, the documentation on the configuration options = for xen virtual
>>> machine under the heading of Timers contains no mention of the= above
>>> mentioned facility, but instead talks about something called a= 'timer_mode'
>>>
>>>
>>> =A0timer_mode: Timer mode (0=3Ddelay virtual time when ticks a= re missed;
>>> 1=3Dvirtual time is always wallclock time
>>> =A0 =A0 =A0 timer_mode (default=3D1; Value=3D'TIMER_MODE&#= 39;)
>>>
>>> Now my question is whether the timer mode =A0=3D 1 is equivale= nt to independent_
>>> wallclock?
>>>
>>> I think the answer is no. While timer_mode =3D 1 decides wheth= er the virtual
>>> machine is able to read the Domain-0 time, the independent_wal= lclock decides
>>> whether you need NTP sychronization on both (user and control)= domains or
>>> not.
>>>
>>> Namely, in the timer_mode =3D 1, the gettimeofday() called fro= m the virtual
>>> machine will return the domain virtual time, but time_mode =3D= 0
>>> gettimeofday() instruction from the virtual machine will retur= n the system
>>> time.
>>>
>>> The independent and dependent modes have an effect on whether = the virtual
>>> machines can use the NTP or any other synchronization of Domai= n-0.
>>>
>>> Is my understanding correct?
>>>
>>> I further want to know whether the working remains similar on = Xen HVMs also.
>>> In the sense that are Hardware based virtual machines capable = of reading the
>>> Domain-0 system time in an analogous way?
>>>
>>>
>>> Your help would be much appreciated. I am new to this area and= I apologize
>>> if my questions seem too basic.
>>
>>
>>
>
>





--00504502b51a1b5ee8048047f260-- --===============0111706682== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0111706682==--