前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >tsc:Marking TSC unstable due to check_tsc_sync_source failed

tsc:Marking TSC unstable due to check_tsc_sync_source failed

作者头像
PedroQin
发布2019-12-18 11:23:15
2.3K0
发布2019-12-18 11:23:15
举报
文章被收录于专栏:WriteSimpleDemoWriteSimpleDemo

异常log分析总结 :tsc: Marking TSC unstable due to checktscsync_source failed

log前后文

/var/log/messages:

代码语言:javascript
复制
......
Nov 16 22:21:14 localhost kernel: x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature
Nov 16 22:21:14 localhost kernel: #8 #9 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23 #24 #25 #26 #27 #28 #29 #30 #31 #32 #33 #34 #35 #36 #37 #38 #39 #40 #41 #42 #43 #44 #45 #46 #47 OK
Nov 16 22:21:14 localhost kernel: x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature
Nov 16 22:21:14 localhost kernel: smpboot: Booting Node   1, Processors  #48
Nov 16 22:21:14 localhost kernel: TSC synchronization [CPU#0 -> CPU#48]:
Nov 16 22:21:14 localhost kernel: Measured 520 cycles TSC warp between CPUs, turning off TSC clock.
Nov 16 22:21:14 localhost kernel: tsc: Marking TSC unstable due to check_tsc_sync_source failed
Nov 16 22:21:14 localhost kernel: x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature
Nov 16 22:21:14 localhost kernel: ------------[ cut here ]------------
Nov 16 22:21:14 localhost kernel: WARNING: CPU: 49 PID: 0 at arch/x86/kernel/cpu/mcheck/mce.c:1486 mcheck_cpu_init+0x9e/0x490
Nov 16 22:21:14 localhost kernel: #49
Nov 16 22:21:14 localhost kernel: Modules linked in:
Nov 16 22:21:14 localhost kernel:
Nov 16 22:21:14 localhost kernel: CPU: 49 PID: 0 Comm: swapper/49 Tainted: G        W      ------------   3.10.0-957.el7.x86_64 #1
......
部分分析

TSCs are kind of notorious for going out of sync between CPUs. This is just saying the kernel isn't going to use the TSC. Later in the boot, it switches the clocksource to hpet, so things should be fine. There's really nothing to fix here.


First it isn't really an issue as the kernel is only letting you know that the Its first try to set TSC failed. It just resorts to another method. The message Is harmless and trivial about what level to print it at. Adding "clocksource=apcipm" near the beginning of "GRUBCMDLINELINUXDEFAULT=" just tells it directly to use an acpi based motherboards power management timer. if "clocksource=acpi_pm" fails for some reason try "clocksource=hpet"...(may work) or check here to see if there are other options:

代码语言:javascript
复制
cat /sys/devices/system/clocksource/clocksource0/available_clocksouce
TSC/hpet/acpi_pm 介绍
代码语言:javascript
复制
[root@localhost ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc hpet acpi_pm
[root@localhost ~]#
TSC

The Time Stamp Counter was once an excellent high-resolution, low-overhead way for a program to get CPU timing information. With the advent of multi-core/hyper-threaded CPUs, systems with multiple CPUs, and hibernating operating systems, the TSC cannot be relied upon to provide accurate results — unless great care is taken to correct the possible flaws: rate of tick and whether all cores (processors) have identical values in their time-keeping registers. There is no promise that the timestamp counters of multiple CPUs on a single motherboard will be synchronized. Therefore, a program can get reliable results only by limiting itself to run on one specific CPU. Even then, the CPU speed may change because of power-saving measures taken by the OS or BIOS, or the system may be hibernated and later resumed, resetting the TSC. In those latter cases, to stay relevant, the program must re-calibrate the counter periodically.

hpet

The High Precision Event Timer (HPET) is a hardware timer used in personal computers. It was developed jointly by Intel and Microsoft and has been incorporated in PC chipsets since circa 2005. Formerly referred to by Intel as a Multimedia Timer,the term HPET was selected to avoid confusion with the software multimedia timers introduced in the MultiMedia Extensions to Windows 3.0.

acpi_pm

The ACPI Power Management Timer (ACPI PMT) is yet another clock device included in almost all ACPI-based motherboards. Its clock signal has a fixed frequency of roughly 3.58 MHz. The device is actually a simple counter increased at each clock tick

参考链接

Bug 885524 - "tsc: Marking TSC unstable due to checktscsyncsource failed" [https://bugzilla.redhat.com/showbug.cgi?id=885524]

fast tsc calibration failed after upgrade to linux 3.6[https://bbs.archlinux.org/viewtopic.php?pid=1210044]

Time Stamp Counter[https://en.wikipedia.org/wiki/TimeStampCounter]

High Precision Event Timer[https://en.wikipedia.org/wiki/HighPrecisionEvent_Timer]

What is the acpi_pm linux clocksource used for, what hardware implements it?[http://stackoverflow.com/questions/7987671/what-is-the-acpi-pm-linux-clocksource-used-for-what-hardware-implements-it]

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-11-19,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 WriteSimpleDemo 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • log前后文
  • 部分分析
  • TSC/hpet/acpi_pm 介绍
    • TSC
      • hpet
        • acpi_pm
        • 参考链接
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档