All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen System Time
@ 2011-03-25 21:23 Srujan Kotikela
  2011-03-28 15:29 ` Dan Magenheimer
  0 siblings, 1 reply; 2+ messages in thread
From: Srujan Kotikela @ 2011-03-25 21:23 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 490 bytes --]

Hi,

Is there any interface for Xen System Time? I am trying to find the average
time Xen takes for several operations. I am planning to add small code to
hypercall definitions in xen to clock the time to perform that particular
functionality.

Are there any functions available in xen which gives time in the Xen kernel.
The interface manual talks about "System Time". But I didn't find any
functions/hypercalls for that. The only one I found was guest_set_time().


--
Srujan D. Kotikela

[-- Attachment #1.2: Type: text/html, Size: 605 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Xen System Time
  2011-03-25 21:23 Xen System Time Srujan Kotikela
@ 2011-03-28 15:29 ` Dan Magenheimer
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Magenheimer @ 2011-03-28 15:29 UTC (permalink / raw)
  To: Srujan Kotikela, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1454 bytes --]

I assume you are trying to measure time elapsed from inside of a VM in a guest OS kernel?

 

If you are running Xen 4.0 or later, you can use the hardware rdtsc instruction to measure elapsed time as it is guaranteed by Xen to be synchronized across cores.  Note that unless you are certain that Xen cannot reschedule another VM (including dom0) during your hypercall, you may sometimes see some weird very large measurements which indicate that a scheduling event has occurred.

 

See docs/misc/tscmode.txt in the Xen source tree (especially the history section) for more information about the TSC.


If you are trying to measure elapsed time IN Xen, see the various CYC_COUNTER macros in xen/common/tmem.c as an example of how this can be done.

 

From: Srujan Kotikela [mailto:ksrujandas@gmail.com] 
Sent: Friday, March 25, 2011 3:24 PM
To: xen-devel@lists.xensource.com
Subject: [Xen-devel] Xen System Time

 

Hi,

 

Is there any interface for Xen System Time? I am trying to find the average time Xen takes for several operations. I am planning to add small code to hypercall definitions in xen to clock the time to perform that particular functionality.

 

Are there any functions available in xen which gives time in the Xen kernel. The interface manual talks about "System Time". But I didn't find any functions/hypercalls for that. The only one I found was guest_set_time().

 


--
Srujan D. Kotikela

[-- Attachment #1.2: Type: text/html, Size: 4657 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 21:23 Xen System Time Srujan Kotikela
2011-03-28 15:29 ` Dan Magenheimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.