From: Xiao Guangrong <guangrong.xiao@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>, mst@redhat.com, mtosatti@redhat.com
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
Xiao Guangrong <xiaoguangrong@tencent.com>
Subject: Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test
Date: Fri, 26 May 2017 11:21:17 +0800 [thread overview]
Message-ID: <09486d4e-7b21-06bb-ee6a-9b847e94cdd0@gmail.com> (raw)
In-Reply-To: <210485b2-c6f5-2f57-f196-dc1b25bbe243@redhat.com>
On 05/26/2017 12:03 AM, Paolo Bonzini wrote:
>
>
> On 25/05/2017 05:19, guangrong.xiao@gmail.com wrote:
>>
>> Note: as qemu needs a precise timer to drive its rtc timer callbacks,
>> that means clock=vm is not suitable for us as it's driven by icount
>> for qtest, so that we use clock=host instead, it is why we put the
>> periodic timer test separately without mixing with rtc-test
>
> I'm not sure I understand. Why would clock_step(1000) not be a good
> replacement for nsleep(1000)?
We can not. As we use the real time to compare with the time that is
passed in the VM, however, clock_step() is not a real time based clock
source which immediately injects a time step to the VM regardless how
much real time elapsed.
I also tried nsleep(1000) before clock_step(1000), i,e:
nsleep(1000);
clock_step(1000);
that can not work too, it looks like the time spend on icount update in
the VM can not be guaranteed。
next prev parent reply other threads:[~2017-05-26 3:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 3:19 [Qemu-devel] [PATCH] qtest: add rtc periodic timer test guangrong.xiao
2017-05-25 16:03 ` Paolo Bonzini
2017-05-26 3:21 ` Xiao Guangrong [this message]
2017-05-26 11:03 ` Paolo Bonzini
2017-05-27 2:59 ` Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09486d4e-7b21-06bb-ee6a-9b847e94cdd0@gmail.com \
--to=guangrong.xiao@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoguangrong@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).