[lkml]   [2004]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: finding out the value of HZ from userspace
    Jamie Lokier wrote:
    > Peter Williams wrote:
    >>>Will this be USER_HZ or kernel HZ?
    >>>Someone earlier suggested it would be USER_HZ which would make it
    >>It has to be whatever enables user space to correctly interpret values
    >>sent to user space as "ticks". That means USER_HZ and it's not useless
    >>as it enables USER_HZ to be different and/or change without breaking
    >>programs that use values expressed in "ticks".
    > It is, however, useless for the _other_ reasons userspace needs to
    > know kernel HZ, including as I mentioned userspace timer granularity.

    Theoretically, which I know can be a pain, user space timer granularity
    should be in USER_HZ as, theoretically, this is the only one user space
    is supposed to know about. Because of this, in my view, HZ and USER_HZ
    should be the same or USER_HZ should be greater than HZ.

    > (Btw, that usage would be better as a period rather than a frequency,
    > so that a "tickless" kernel can report zero).

    _SC_CLK_TCK is a POSIX.1 definition and can't be changed. But I don't
    think that there's any impediment to adding new parameters that can be
    reported by sysconf().

    > The fundamental problem is that there are two values, and both values
    > have programs which can usefully use them.
    > How hard can it be to export both?

    Making HZ == USER_HZ would also solve the problem.

    Dr Peter Williams, Chief Scientist
    Aurema Pty Limited Tel:+61 2 9698 2322
    PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
    79 Myrtle Street, Chippendale NSW 2008, Australia

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:01    [W:0.022 / U:57.128 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site