From: Olaf Hering <olaf@aepfle.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
x86@kernel.org
Subject: Re: recalibrating x86 TSC during suspend/resume
Date: Fri, 22 Feb 2019 15:28:36 +0100 [thread overview]
Message-ID: <20190222142836.GA14744@aepfle.de> (raw)
In-Reply-To: <036fab04-0c1b-134d-a170-399b2dc6ab5f@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
On Fri, Feb 22, Paolo Bonzini wrote:
> On 22/02/19 12:44, Thomas Gleixner wrote:
> >> The specific usecase I have is a workload within VMs that makes heavy
> >> use of TSC. The kernel is booted with 'clocksource=tsc highres=off nohz=off'
> >> because only this clocksource gives enough granularity. The default
> >> paravirtualized clock will return the same values via
> >> clock_gettime(CLOCK_MONOTONIC) if the timespan between two calls is too
> >> short. This does not happen with 'clocksource=tsc'.
>
> This shouldn't happen. clock_gettime(CLOCK_MONOTONIC) should be
> monotonic increasing. Do you have a testcase?
Two years ago I tweaked sysbench to track the execution time of the
'memory' test:
https://github.com/olafhering/sysbench
https://github.com/olafhering/sysbench/blame/pv/src/tests/memory/sb_memory.c
The checks in diff_timespec() triggered with clocksource=xen, but I can
not reproduce it right now with 5.0 and 4.4 based kernels. I have no
data how KVM behaves. In the end the hypervisor was tweaked to tolerate
a certain jitter in expected TSC speed before emulation kicks in. Up to
~1MHz would be ok to stay within the 500PPM limit that ntpd can handle.
But now there is that "island" issue that needs to be resolved in one
way or another.
Olaf
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2019-02-22 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 10:53 recalibrating x86 TSC during suspend/resume Olaf Hering
2019-02-22 11:44 ` Thomas Gleixner
2019-02-22 11:51 ` Olaf Hering
2019-02-22 12:31 ` Paolo Bonzini
2019-02-22 14:28 ` Olaf Hering [this message]
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=20190222142836.GA14744@aepfle.de \
--to=olaf@aepfle.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 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.