[lkml]   [2002]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: HZ, preferably as small as possible
    Użytkownik Bill Davidsen napisał:
    > On Thu, 11 Jul 2002, Martin Dalecki wrote:
    >>hz = sysconf(_SC_CLK_TCK); /* get ticks/s from system */
    >>And yes I know the libproc is *evil* in this area.
    >>The rest should be an implementation detail of sysconf().
    > Yes, any of the changes need to make the dynamic value available to
    > programs. Alas, too many programs grab the HZ value and compile it in, and
    > don't work right on a kernel with a modified rate. I don't know if the
    > CLK_TCK macro is dynamic or not, I sure hope so.
    > I'd like to see it set at boot time, and available in /proc/sys for easy
    > use by scripts. As noted by others, there are a lot of uses in the kernel
    > source which assume that arithmetic will happen at compile time, and even
    > if you ignore the overhead it would take a lot of rewriting to make it
    > dynamic. Setting it a boot time gets most of the gain and none of the
    > pain (boot time = pick a kernel, not a parameter).

    IMHO there where reasons why the standards are defining a function
    to access this information from applications.

    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 13:22    [W:0.023 / U:1.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site