From: xiexiangyou <xiexiangyou@huawei.com>
To: <kvm@vger.kernel.org>, <zamsden@redhat.com>
Subject: [RFC]Enlarge the dalta of TSC match window from one second to five second
Date: Mon, 11 Aug 2014 15:41:00 +0800 [thread overview]
Message-ID: <53E8738C.6020601@huawei.com> (raw)
hi,
In kvm_write_tsc() func of kvm, The TSCs will be synchronized unless the time diff of creating vcpus small than one second.
However, In my enviroment, stress is large, the vcpu creating time is delay, sometimes the diff time between vcpu creating
is more than one second. In this case, TSCs in VM are not the same with each other when it boot.
(1)To solve the issue, should we enlarge the dalta of TSC match window from one second to five second?
as follows:
* it's better to try to match offsets from the beginning.
*/
- if (nsdiff < NSEC_PER_SEC &&
+ if (nsdiff < 5 *NSEC_PER_SEC &&
vcpu->arch.virtual_tsc_khz == kvm->arch.last_tsc_khz) {
if (!check_tsc_unstable()) {
(2)Another way to solve the issue: setting all VPUs' tsc_offset equal to the first boot VCPU's. So in special case, hotpluging VCPU,
we can ensure TSC clocksource is stable.
Thanks.
xiexiangyou
next reply other threads:[~2014-08-11 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 7:41 xiexiangyou [this message]
2014-08-18 11:20 ` [RFC]Enlarge the dalta of TSC match window from one second to five second Marcelo Tosatti
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=53E8738C.6020601@huawei.com \
--to=xiexiangyou@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=zamsden@redhat.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