[lkml]   [2001]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to know HZ from userspace?
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?

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 12:54    [W:0.069 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site