linux查看时钟源ip,[转载]Suse linux查看可用时钟源和当前时钟源

steve@sle11-sp2:~/Desktop>

cat

/sys/devices/system/clocksource/clocksource0/available_clocksource

tsc hpet acpi_pm

steve@sle11-sp2:~/Desktop>

cat

/sys/devices/system/clocksource/clocksource0/current_clocksource

tsc

设置HPET为当前时钟源

echo 'hpet' >

/sys/devices/system/clocksource/clocksource0/current_clocksource

查看timer信息:

cat /proc/timer_list

Windows 7 使用HPET(需要重启):

bcdedit /set useplatformclock true enable

HPET

bcdedit /deletevalue

useplatformclock disable

查看tsc时钟源类型。《深入理解Linux内核》一书中说HPET时钟源是首选,但是现在的TSC时钟都是constant_tsc和nonstop_tsc类型的,不会受到CPU频率的变化影响精度。而且TSC时钟的高频率和读取速度,使得TSC比起HPET更有优势,所以Linux内核会选择更好的TSC时钟源。

# cat /proc/cpuinfo

flags : fpu vme de pse tsc msr pae mce cx8

apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse

sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl

xtopology nonstop_tsc aperfmperf pni

pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr

pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat

epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept

vpid

TSC 的4种类型:

1. Constant. Constant TSC means that the TSC does not change

with CPU frequency changes, however it does change on C state

transitions.

2. Invariant. As described in the Intel manual: “The invariant TSC

will run at a constant rate in all ACPI P-, C- and T-states”

3. Non-stop. The Non-stop TSC has the properties of both Constant

and Invariant TSC.

4. None of the above. The TSC changes with the C, P and S state

transitions.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值