Re: sysconf (was Re: RLIM_INFINITY inconsistency between archs)

From: H. Peter Anvin (hpa@transmeta.com)
Date: Sun Jul 30 2000 - 19:59:57 EST


Ralf Baechle wrote:
>
> On Thu, Jul 27, 2000 at 05:34:54PM -0700, H. Peter Anvin wrote:
>
> > > Linus is right, no major structural change is necessary. For example,
> > > here's a very short patch necessary to support __SC_CLK_TCK (which is
> > > probably the most interesting of the sysconf() variables as far as I'm
> > > concerned.) It's only a 5-line patch. (See below)
> >
> > I don't think we want to do this! IMO, HZ should not get exported to
> > user space *AT ALL*. Instead, for the few interfaces that need it,
> > we'll export a "user space HZ" (USER_HZ) which is fixed. No need for
> > a kernel hack. When we support nonstandard values for HZ, we need to
> > fix the few interfaces that actually export jiffies values to convert
> > from "user jiffies" to real jiffies.
>
> Due to machines that can't program their clocks to the standard clock rate
> I've created a patch which does things somewhat different. I found the
> USER_HZ approach to be insufficient, there is a lot of software out there
> which uses <linux/param.h>'s HZ definition directly upto and including the
> current glibc development snapshot, so you're more or less forced to live
> with HZ.
>

#define USER_HZ 100

#ifdef __KERNEL__
#define HZ 1024
#else
#define HZ USER_HZ
#endif

-- 
<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:32 EST