Messages in this thread | | | Date | Wed, 26 May 2010 16:41:06 +0200 (CEST) | From | Thomas Gleixner <> | Subject | RE: [PATCH] x86: Export tsc related information in sysfs |
| |
On Wed, 26 May 2010, Dan Magenheimer wrote: > > From: Thomas Gleixner [mailto:tglx@linutronix.de] > > > > Arch independent solution is to provide information about the current > > clock source in general. This is _NOT_ a TSC specific problem, you > > have the same trouble with any other clocksource which gets calibrated > > and does not take it's frequency as a constant value from boot loader, > > configuration or some CPU/chipset register. The only missing piece is > > a frequency member in struct clocksource which needs to be filled in > > by the arch/machine specific code. > > Actually there is already a frequency in struct clocksource except > it's represented by the two components: mult and shift. Maybe > it would be best to expose these instead of khz (for all clocksources) > so as to limit abuse by naive users.
You mean the TSC user space ones ?
> So, Thomas and John, if Brian's patch is modified to provide: > > /sys/devices/system/clocksource/clocksource0/current_mult > /sys/devices/system/clocksource/clocksource0/current_shift > and/or > /sys/devices/system/clocksource/clocksource0/current_khz > > is that an acceptable arch-independent patch? (And which do > you prefer?)
I'd rather prefer the frequency interface for a simple reason. It allows to add a commandline option which provides the NTP folks with a sensible solution to their calibration problem as I don't see that a longer calibration time will reliably fix it.
So we'd get a "clocksource_freq=XXX" option which would be applied to the clocksource which is selected on the command line with "clocksource=NNN".
John ?
Thanks,
tglx
| |