Re: [PATCH] x86: Export tsc related information in sysfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brian Bloniarz
Date: Wednesday, May 26, 2010 - 9:02 am

On 05/26/2010 11:04 AM, john stultz wrote:

Yeah, sure.

Really? I was under the impression that tsc_khz can differ
from cpu_mhz (invariant tsc?), and cpu_mhz can differ from what
shows up in /proc/cpuinfo cpuMHz due to cpufreq scaling. I was
also under the impression that knowing or controlling tsc_khz
is what NTP needs to ensure stability (assuming the TSC is
otherwise stable, i.e. no halts-in-idle, NMI etc etc weirdness).

Dan Magenheimer wrote:

Thomas Gleixner:

Another possibility:

$ cd /sys/devices/system/clocksource/clocksource0/

$ ls -lR
available_clocksource
current_clocksource
current_clocksource_ln -> tsc
tsc/
tsc/calibration
tsc/calibrated_master -> ../hpet
tsc/khz
hpet/
hpet/calibration
hpet/khz

$ cat tsc/calibration
slave
# there has been a one-time calibration against a reference at boot time,
# the source clock is in calibrated_master and and the khz is calculated
# from that

$ cat hpet/calibration
constant
# takes its value from constant value from boot loader, configuration
# or some CPU/chipset register

Would this be workable? I need to look deeper at how the other clocksources
work, for example the virtualized ones. I'm also wondering if NICs with their
own clocks & IEEE-1588 support are going to become part of the clocksource
infrastructure (see e.g. http://patchwork.ozlabs.org/patch/52626/)

Thanks everyone for the guidance.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [PATCH] x86: Export tsc related information in sysfs, Dan Magenheimer, (Mon May 24, 11:13 am)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 11:19 am)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 1:20 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 2:26 pm)
RE: [PATCH] x86: Export tsc related information in sysfs, Dan Magenheimer, (Mon May 24, 3:04 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 3:30 pm)
RE: [PATCH] x86: Export tsc related information in sysfs, Dan Magenheimer, (Mon May 24, 4:16 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 4:19 pm)
RE: [PATCH] x86: Export tsc related information in sysfs, Dan Magenheimer, (Mon May 24, 5:01 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Mon May 24, 5:07 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Mon May 24, 6:33 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Tue May 25, 5:16 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Tue May 25, 7:50 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, Thomas Gleixner, (Wed May 26, 5:30 am)
Re: [PATCH] x86: Export tsc related information in sysfs, Thomas Gleixner, (Wed May 26, 5:35 am)
RE: [PATCH] x86: Export tsc related information in sysfs, Dan Magenheimer, (Wed May 26, 7:26 am)
RE: [PATCH] x86: Export tsc related information in sysfs, Thomas Gleixner, (Wed May 26, 7:41 am)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Wed May 26, 9:02 am)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Wed May 26, 11:24 am)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Wed May 26, 11:44 am)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Wed May 26, 11:51 am)
Re: [PATCH] x86: Export tsc related information in sysfs, Brian Bloniarz, (Wed May 26, 1:22 pm)
Re: [PATCH] x86: Export tsc related information in sysfs, H. Peter Anvin, (Wed May 26, 2:06 pm)