lkml.org 
[lkml]   [2001]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to know HZ from userspace?
On Wed, Jun 06, 2001 at 08:59:51PM +0200, Tomas Telensky wrote:
> > On Wed, Jun 06, 2001 at 08:09:33PM +0200, Tomas Telensky wrote:
> > > > Hi!
> > > >
> > > > Is there any way to read out the compile-time HZ value of the kernel?
> > >
> > > Why simply #include <asm/param.h>?
> >
> > because the include file doesn't say anything about the HZ value of
> > the currently running kernel, but only about some kernel source somewhere
> > on your harddrive?
>
> This _SHOULD_ correspond on each linux instalation. But if you would
> distribute a binary to other people it's a problem.

I my initial mail I wrote that I'm talking about user-mode-linux. So for
example you compile a program, copy it into your user-mode-linux filesystem,
and it won't work anymore. (recompiling is also not an option, who has a
kernel source installed inside his user-mode-linux root filesystem).

and what happens if you recompile your kernel with a different HZ (because
of tc's TBF or something)... then you would have to recompile your userspace
application afterwards?

nah. That's not a solution.

I'd say:

- Either change all sysctl variables to be HZ-independent, or
- Create a sane way to read HZ from the running kernel.

Everything else is broken, from my point of view.

> Tomas

--
Live long and prosper
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:54    [W:0.065 / U:2.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site