r***e 发帖数: 2000 | 1 what time does gettimeofday() get? from which core? |
S*A 发帖数: 7142 | 2 It depends on which timer resource you are using.
You can register many different timer resource
and the system will pick on of the best.
In my machine, I have this in dmesg:
[ 0.000000] hpet clockevent registered
[ 0.731028] Switching to clocksource tsc
So the it will be getting the tsc from the current
core.
【在 r***e 的大作中提到】 : what time does gettimeofday() get? from which core?
|
r***e 发帖数: 2000 | 3
thank you, I did that on my computer,
========
$ dmesg | grep clock
[ 0.000000] hpet clockevent registered
[ 0.308020] Switching to clocksource tsc
[ 0.648807] Switching to clocksource hpet
[ 0.689338] rtc_cmos 00:03: setting system clock to 2011-02-16 02:06:08
UTC (1297821968)
========
What does that (two switching) mean?
【在 S*A 的大作中提到】 : It depends on which timer resource you are using. : You can register many different timer resource : and the system will pick on of the best. : In my machine, I have this in dmesg: : [ 0.000000] hpet clockevent registered : [ 0.731028] Switching to clocksource tsc : So the it will be getting the tsc from the current : core.
|
S*A 发帖数: 7142 | 4 can you grep tsc in your dmesg.
TSC some times can be unreliable. Random drifting.
Very often cause by the SMI interrupt. Apple boot camp
for example has very bad tsc drifting. So the kernel
might decide tsc is so bad that the kernel don't want
to use it.
【在 r***e 的大作中提到】 : : thank you, I did that on my computer, : ======== : $ dmesg | grep clock : [ 0.000000] hpet clockevent registered : [ 0.308020] Switching to clocksource tsc : [ 0.648807] Switching to clocksource hpet : [ 0.689338] rtc_cmos 00:03: setting system clock to 2011-02-16 02:06:08 : UTC (1297821968) : ========
|
r***e 发帖数: 2000 | 5
that was the only line,
I see, thank you so much!
【在 S*A 的大作中提到】 : can you grep tsc in your dmesg. : TSC some times can be unreliable. Random drifting. : Very often cause by the SMI interrupt. Apple boot camp : for example has very bad tsc drifting. So the kernel : might decide tsc is so bad that the kernel don't want : to use it.
|
d******e 发帖数: 117 | 6 如下可以看系统当前使用的时钟
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
【在 r***e 的大作中提到】 : : that was the only line, : I see, thank you so much!
|