Re: HZ needed in userspace, was Re: sysconf (was Re: RLIM_INFINITY inconsistency between archs)

From: H. Peter Anvin (hpa@zytor.com)
Date: Sun Jul 30 2000 - 15:44:10 EST


Followup to: <20000730054322.A1263@home.ds9a.nl>
By author: bert hubert <ahu@ds9a.nl>
In newsgroup: linux.dev.kernel
>
> On Sat, Jul 29, 2000 at 06:16:42PM -0700, H. Peter Anvin wrote:
>
> > I believe I already mentioned that the sysctl (/proc/sys) mechanism is
> > the preferred way to export these kinds of data tokens from the
> > kernel. /etc/sysconf could refer the file entries in /proc/sys where
> > appropriate, or we could have /proc/sys/kernel/sysconf.
>
> I was working on the 2.4 advanced routing & shaping HOWTO, and documenting
> the ICMP ratelimiting settings in /proc/sys, and discovered that this
> ratelimiting is specified in 'jiffies per packet' - which means that
> userspace people need to know HZ in order to configure their kernel
> properly.
>
> So userspace *does* need to know HZ, or this interface needs to be rewritten
> to use milliseconds, for example.
>

It doesn't have to be, although that would be nice, and it really
should be a hanging offence to create new interfaces which export HZ
to user space. The point is that when we change HZ in kernel space,
we will still export HZ == 100 to user space (i386), and we'll have to
do the conversion in kernel space.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

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



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:31 EST