Re: Scheduler set to 1000Hz

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Fri, 22 Jan 1999 17:00:01 +0100 (CET)


On Fri, 22 Jan 1999, Matti Aarnio wrote:

> It is somewhat difficult to modifying presentation machinery of some
> values in e.g. /proc/123/stat "file" to scale them so that they always
> present their value as if the HZ would be the ``classical constant''
> for given platform. For example, where would the ``classical constant''
> be taken from, if the only instance of ``HZ'' is modified ?

'Hz' has a physical definition. The Linux HZ constant just says how many
timer interrupts per second should occur. The requirement is to never let
this (arbitrary) constant show up, but to have all API components use the
'real-world' definition of time.

> In this case the deprecated sysconf(_SC_CLK_TCK) would be THE answer
> to solve the problems that ps/top/et.al. have.

not at all. The problem is that /proc/<pid>/stat (and other kernel
interfaces) export values that are dependent on the kernel-internal HZ
definition. They should export 'natural' units like nanoseconds or
microseconds, this solves the problem once for all, makes binary data
files exchangable between different-HZ Linux boxes, etc.

-- mingo

-
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/