Re: How to know HZ from userspace?

Joel Becker (jlbec@evilplan.org)
Thu, 31 May 2001 01:22:10 +0100


On Wed, May 30, 2001 at 05:07:22PM -0700, H. Peter Anvin wrote:
> Followup to: <20010530203725.H27719@corellia.laforge.distro.conectiva>
> By author: Harald Welte <laforge@gnumonks.org>
> In newsgroup: linux.dev.kernel
> > Is there any way to read out the compile-time HZ value of the kernel?
>
> Yes, but that's because the interfaces are broken. The decision has
> been that these values should be exported using the default HZ for the
> architecture, and that it is the kernel's responsibility to scale them
> when HZ != USER_HZ. I don't know if any work has been done in this
> area.

Pardon, but that still seems broken to me. USER_HZ shouldn't
matter to the architecture either. I would think that if
'echo 10 > /proc/foo/icmp_foo' sets a timeout of 10ms on alpha, it
should also do so on x86, sparc, and mips. Why should the userspace
implementation *ever* have to know the 'architecture HZ', the 'real HZ'
or anything of the kind?

Joel

-- 

"I'm drifting and drifting Just like a ship out on the sea. Cause I ain't got nobody, baby, In this world to care for me."

http://www.jlbec.org/ jlbec@evilplan.org - 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/