Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1209956 > unrolled thread
| Started by | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| First post | 2015-08-19 19:00 +0200 |
| Last post | 2015-08-21 17:40 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] hyper-v: mark TSC as unstable Vitaly Kuznetsov <vkuznets@redhat.com> - 2015-08-19 19:00 +0200
[tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2015-08-21 09:50 +0200
Re: [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable Peter Zijlstra <peterz@infradead.org> - 2015-08-21 16:40 +0200
RE: [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable KY Srinivasan <kys@microsoft.com> - 2015-08-21 17:40 +0200
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Date | 2015-08-19 19:00 +0200 |
| Subject | [PATCH] hyper-v: mark TSC as unstable |
| Message-ID | <pZeSt-3lt-7@gated-at.bofh.it> |
Hyper-V top-level functional specification states, that "algorithms should
be resilient to sudden jumps forward or backward in the TSC value", this
means that we should consider TSC as unstable. In some cases tsc tests are
able to detect the instability, it was detected in 543 out of 646 boots in
my testing:
Measured 6277 cycles TSC warp between CPUs, turning off TSC clock.
tsc: Marking TSC unstable due to check_tsc_sync_source failed
This is, however, just a heuristic. On Hyper-V platform there are two good
clocksources: MSR-based hyperv_clocksource and recently introduced TSC
page.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/kernel/cpu/mshyperv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index aad4bd8..6fd023d 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -141,6 +141,7 @@ static void __init ms_hyperv_init_platform(void)
no_timer_check = 1;
#endif
+ mark_tsc_unstable("running on Hyper-V");
}
const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> |
|---|---|
| Date | 2015-08-21 09:50 +0200 |
| Subject | [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable |
| Message-ID | <pZPfj-5Az-9@gated-at.bofh.it> |
| In reply to | #1209956 |
Commit-ID: 88c9281a9fba67636ab26c1fd6afbc78a632374f
Gitweb: http://git.kernel.org/tip/88c9281a9fba67636ab26c1fd6afbc78a632374f
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
AuthorDate: Wed, 19 Aug 2015 09:54:24 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 21 Aug 2015 08:44:38 +0200
x86/hyperv: Mark the Hyper-V TSC as unstable
The Hyper-V top-level functional specification states, that
"algorithms should be resilient to sudden jumps forward or
backward in the TSC value", this means that we should consider
TSC as unstable. In some cases tsc tests are able to detect the
instability, it was detected in 543 out of 646 boots in my
testing:
Measured 6277 cycles TSC warp between CPUs, turning off TSC clock.
tsc: Marking TSC unstable due to check_tsc_sync_source failed
This is, however, just a heuristic. On Hyper-V platform there
are two good clocksources: MSR-based hyperv_clocksource and
recently introduced TSC page.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Link: http://lkml.kernel.org/r/1440003264-9949-1-git-send-email-vkuznets@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/mshyperv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index aad4bd8..6fd023d 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -141,6 +141,7 @@ static void __init ms_hyperv_init_platform(void)
no_timer_check = 1;
#endif
+ mark_tsc_unstable("running on Hyper-V");
}
const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2015-08-21 16:40 +0200 |
| Subject | Re: [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable |
| Message-ID | <pZVE5-6qd-17@gated-at.bofh.it> |
| In reply to | #1210974 |
On Fri, Aug 21, 2015 at 12:45:50AM -0700, tip-bot for Vitaly Kuznetsov wrote: > Commit-ID: 88c9281a9fba67636ab26c1fd6afbc78a632374f > Gitweb: http://git.kernel.org/tip/88c9281a9fba67636ab26c1fd6afbc78a632374f > Author: Vitaly Kuznetsov <vkuznets@redhat.com> > AuthorDate: Wed, 19 Aug 2015 09:54:24 -0700 > Committer: Ingo Molnar <mingo@kernel.org> > CommitDate: Fri, 21 Aug 2015 08:44:38 +0200 > > x86/hyperv: Mark the Hyper-V TSC as unstable > > The Hyper-V top-level functional specification states, that > "algorithms should be resilient to sudden jumps forward or > backward in the TSC value", this means that we should consider > TSC as unstable. In some cases tsc tests are able to detect the > instability, it was detected in 543 out of 646 boots in my > testing: > > Measured 6277 cycles TSC warp between CPUs, turning off TSC clock. > tsc: Marking TSC unstable due to check_tsc_sync_source failed > > This is, however, just a heuristic. On Hyper-V platform there > are two good clocksources: MSR-based hyperv_clocksource and > recently introduced TSC page. *groan*.. and where are the paravirt ops like pv_time_ops for hyperv to fix up this mess? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2015-08-21 17:40 +0200 |
| Subject | RE: [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as unstable |
| Message-ID | <pZWAa-7LJ-9@gated-at.bofh.it> |
| In reply to | #1211205 |
> -----Original Message----- > From: Peter Zijlstra [mailto:peterz@infradead.org] > Sent: Friday, August 21, 2015 7:34 AM > To: mingo@kernel.org; Haiyang Zhang <haiyangz@microsoft.com>; > tglx@linutronix.de; hpa@zytor.com; vkuznets@redhat.com; KY Srinivasan > <kys@microsoft.com>; torvalds@linux-foundation.org; linux- > kernel@vger.kernel.org > Cc: linux-tip-commits@vger.kernel.org > Subject: Re: [tip:x86/platform] x86/hyperv: Mark the Hyper-V TSC as > unstable > > On Fri, Aug 21, 2015 at 12:45:50AM -0700, tip-bot for Vitaly Kuznetsov wrote: > > Commit-ID: 88c9281a9fba67636ab26c1fd6afbc78a632374f > > Gitweb: > https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fgit.kern > el.org%2ftip%2f88c9281a9fba67636ab26c1fd6afbc78a632374f&data=01%7c01 > %7ckys%40microsoft.com%7cca840f9ebba34958dc9a08d2aa35a6c4%7c72f988 > bf86f141af91ab2d7cd011db47%7c1&sdata=hzE233wXaLAYShWPE18SQJQvQe > JguAdB6oj%2bF%2blx7Ok%3d > > Author: Vitaly Kuznetsov <vkuznets@redhat.com> > > AuthorDate: Wed, 19 Aug 2015 09:54:24 -0700 > > Committer: Ingo Molnar <mingo@kernel.org> > > CommitDate: Fri, 21 Aug 2015 08:44:38 +0200 > > > > x86/hyperv: Mark the Hyper-V TSC as unstable > > > > The Hyper-V top-level functional specification states, that > > "algorithms should be resilient to sudden jumps forward or > > backward in the TSC value", this means that we should consider > > TSC as unstable. In some cases tsc tests are able to detect the > > instability, it was detected in 543 out of 646 boots in my > > testing: > > > > Measured 6277 cycles TSC warp between CPUs, turning off TSC clock. > > tsc: Marking TSC unstable due to check_tsc_sync_source failed > > > > This is, however, just a heuristic. On Hyper-V platform there > > are two good clocksources: MSR-based hyperv_clocksource and > > recently introduced TSC page. > > *groan*.. and where are the paravirt ops like pv_time_ops for hyperv to > fix up this mess? We register external clocksource and clockevents devices based on a hypervisor based time source and timers to deal with this issue. Regards, K. Y -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web