From: Jay Patel Subject: Fwd: Re: Where is xtime updated in a domU with an independent wallclock? Date: Wed, 2 May 2007 12:23:37 -0700 (PDT) Message-ID: <393461.24077.qm@web62406.mail.re1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0-935262788-1178133817=:24077" Content-Transfer-Encoding: 8bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --0-935262788-1178133817=:24077 Content-Type: multipart/alternative; boundary="0-1951384273-1178133817=:24077" --0-1951384273-1178133817=:24077 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Pardon my stupidity. Note: forwarded message attached. Cheers, Jay. --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. --0-1951384273-1178133817=:24077 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Pardon my stupidity.

Note: forwarded message attached.

Cheers,
Jay.



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos. --0-1951384273-1178133817=:24077-- --0-935262788-1178133817=:24077 Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Received: from [63.252.64.254] by web62406.mail.re1.yahoo.com via HTTP; Wed, 02 May 2007 12:21:48 PDT Date: Wed, 2 May 2007 12:21:48 -0700 (PDT) From: Jay Patel Subject: Re: [Xen-devel] Where is xtime updated in a domU with an independent wallclock? To: Keir Fraser In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1694396170-1178133708=:23801" Content-Transfer-Encoding: 8bit Content-Length: 1574 --0-1694396170-1178133708=:23801 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Keir Fraser wrote:Re: [Xen-devel] Where is xtime updated in a domU with an independent wallclock? On 2/5/07 07:41, "Jay Patel" wrote: I have just started looking at the code for Xen so please bear with me. A domU Linux kernel running with independent_wallclock=1 seems to sync its time with dom0 after every "xm unpause" (obviously preceded by an "xm pause"). I don't see where the xtime variable is being updated after an "xm unpause", i.e., domain_unpause_by_systemcontroller(). Right after the unpause, it seems to me that the xtime in the domU should be what it were just prior to the pause. Yes, a guest with independent wallclock should never sync with the wallclock time record provided by Xen, even after an unpause (the unpause is not explicitly visible to the guest anyway). Except this is not the case. The DomU domains with an independent wall clock seems to sync with the Dom0 clock. I've repeated this experiment multiple times on two separate machines. Can anyone verify? Steps (using xen 3.0.3 with linux kernel 2.6.16.29) DomU: (0) get a console to $domU (1) set /proc/sys/xen/independent_wallclock to 1 (2) run the following sh script: "while true; do date; done" In Dom0 (as root): (3) xm pause $domU (4) wait a few seconds/minutes (5) xm unpause $domU The sh script will continue and will output the current time (in relation to Dom0). I am not sure why this is happening. I followed the xen and the linux kernel code and could not see where xtime is being updated. Anybody have any other insights as to what is going on here? Cheers, Jay. --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. --0-1694396170-1178133708=:23801 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:
Re: [Xen-devel] Where is xtime updated in a domU with an independent wallclock?


On 2/5/07 07:41, "Jay Patel" <nitrofin@yahoo.com> wrote:

I have just started looking at the code for Xen so please bear with me.
 
A domU Linux kernel running with independent_wallclock=1 seems to sync its  time with dom0 after every "xm unpause" (obviously preceded by an "xm  pause").
 
I don't see where the xtime variable is being updated after an "xm unpause",  i.e., domain_unpause_by_systemcontrolle r(). Right after the unpause, it seems to  me that the xtime in the domU should be what it were just prior to the  pause.

Yes, a guest with independent wallclock should never sync with the wallclock time record provided by Xen, even after an unpause (the unpause is not explicitly visible to the guest anyway).


Except this is not the case. The DomU domains with an independent wall clock seems to sync with the Dom0 clock. I've repeated this experiment multiple times on two separate machines. Can anyone verify?

Steps (using xen 3.0.3 with linux kernel 2.6.16.29)

DomU:
(0) get a console to $domU
(1) set /proc/sys/xen/independent_wallclock to 1
(2) run the following sh script: "while true; do date; done"

In Dom0 (as root):
(3) xm pause $domU
(4) wait a few seconds/minutes
(5) xm unpause $domU

The sh scrip t will continue and will output the current time (in relation to Dom0). I am not sure why this is happening. I followed the xen and the linux kernel code and could not see where xtime is being updated.

Anybody have any other insights as to what is going on here?

Cheers,
Jay.


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos. --0-1694396170-1178133708=:23801-- --0-935262788-1178133817=:24077 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 --0-935262788-1178133817=:24077--