Re: finding out the value of HZ from userspace

From: Richard Curnow
Date: Tue Mar 16 2004 - 12:33:43 EST


* Albert Cahalan <albert@xxxxxxxxxxxxxxxxxxxxx> [2004-03-16]:
>
> Fortunately this is a fresh new reason to beg Linus for
> some data. (all previous arguments have been rejected)
> What would be useful for you?
>
> HZ (-1 for tickless?)
> USER_HZ
> freq_scale
> some boolean to indicate ppc-like (pure cycle counter) time
> ???

freq_scale would be a good starting point, I think.

However, there is worse. There is bounds checking on the txc.freq
argument to adjtimex(). IIRC the bounds have changed at various points
in the kernel history, but at one time the limit was +/- 100ppm. At the
time, I had a mobo with a -300ppm clock error. To cope with this,
chrony modifies txc.tick to take out the gross error as well as txc.freq
to adjust the fine error. Therefore, it needs some idea of how tick and
freq inter-relate, and what the valid range of values for tick is. This
is another mess. I need to go away and think some more to know info
from the kernel side would make the problem easier to code for, though.

--
Richard \\\ SH-4/SH-5 Core & Debug Architect
Curnow \\\ SuperH (UK) Ltd, Bristol
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/