2015-04-28 22:46 GMT-04:00 Xuehan Xu <xxhdx1985...@gmail.com>: > ---------- Forwarded message ---------- > From: "Xuehan Xu" <xxhdx1985...@gmail.com> > Date: Apr 29, 2015 10:11 AM > Subject: How to get real time in a xen vm? > To: <xs-de...@lists.xenserver.org> > Cc: > > Hi, everyone > > Recently, I got a need to measure the latency of the I/O operation of > TAPDISK on dom0, in comparison with that latency on a phyisical machine. > > I tried to measure the latency by calling "gettimeofday" right before and > after the io operation and compute the difference. But the time acquired by > gettimeofday is a virtual time of the dom0, which makes it meaningless to > compare to the latency on a physical machine. > > How can I get the real and highly accurate time in dom0? Thanks:) > > > You may want to try the instruction 'rdtsc' to read the timestamp counter register to get the latency.
Meng -- ----------- Meng Xu PhD Student in Computer and Information Science University of Pennsylvania
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel