qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] guest host time synchronization


From: Jiahuan Zhang
Subject: Re: [Qemu-devel] guest host time synchronization
Date: Tue, 18 Apr 2017 17:10:59 +0200

On 18 April 2017 at 16:32, Stefan Hajnoczi <address@hidden> wrote:

> On Tue, Apr 11, 2017 at 09:01:40AM +0200, Jiahuan Zhang wrote:
> > I made a test to check the time difference of QEMU emulated ARM-based
> Linux
> > guest and the Windows host. The result is, the guest time is around 0.2
> > second faster than the host. I used the "-rtc base" option.
> >
> > So can I say that, the time precision of QEMU emulation is in seconds? Is
> > it possible to make it more precise? because I need to test the latency
> of
> > my guest/host communication with high time resolution, at least in
> > miliseconds.
> >
> > Please let me know if you have any method  for the communication
> > performance testing. Thank you very much.
>
> This can depend on the exact board (machine type) being emulated because
> the emulated clock and timer hardware may be different.
>
> Please share your QEMU command-line so we can see the exact ARM guest
> hardware configuration.
>
> Stefan
>
Hi. Sorry that I forgot to update the testing.

I found out an error in my application codes and fixed it.

Now the testing is that, guest app sends data and host app receives data. I
use gettimeofday() to get the time stamp before the sending function
in LInux guest app, and use GetSystemAsFileTime() to get the timestamp
after the receiving function in Windows Host.
Now the testing result is that, the time difference is around 279ms.

My QEMU command-line is

$ qemu/build/arm-softmmu/qemu-system-arm.exe -M vexpress-a9 -kernel
zImage_vexpress_4-10 -dtb vexpress-v2p-ca9.dtb -initrd rootfs.img.gz
-append "console=ttyAMA0 root=/dev/ram rdinit=linuxrc" -chardev
pipe,id=char1,path=mynamedpipe -serial telnet:localhost:5555,server,nowait
-serial stdio -serial stdio -serial stdio -serial chardev:char1 -monitor
telnet:localhost:4444,server,nowait -sd test.img -nographic -rtc
base=utc,clock=host,driftfix=slew
I want to get the latency of the pipe communication as precise as possible.
Currently, the mehod I am using gets the time difference which must
include some pre-emption that I don't know. So it's not reliable.

Do you know any method for QEMU to evaluate this kind of communciation
performance?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]