Re: How to know HZ from userspace?

From: Chris Wedgwood (cw@f00f.org)
Date: Wed Jun 06 2001 - 18:59:56 EST


On Wed, Jun 06, 2001 at 01:55:53PM -0700, Linus Torvalds wrote:

    In 2.4.x, you'll get it on the stack as one of the ELF auxilliary
    entries (AT_CLKTCK).
    
    Strictly speaking that's the "frequency at which 'times()' counts", ie
    the kernel CLOCKS_PER_SEC, not HZ. But from a user perspective the two
    should hopefully always be the same (if any of the /proc fields etc
    should really use CLOCKS_PER_SEC, not HZ).

I would hope nobody actually uses the above. Since I run kernels
with HZ==2048 and started having to hack various userland tools to
make them happy I too was after this information.

However, it was pointed out that eliminated HZ completely might be a
better idea, and then just exporting all values to userspace as
nanoseconds or similiar... a radically different approach to what we
have now but something that struck me as a really good idea.

Fodder for 2.5.x perhaps?

  --cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 07 2001 - 21:00:56 EST