Re: Scheduler set to 1000Hz

Matti Aarnio (matti.aarnio@sonera.fi)
Fri, 22 Jan 1999 11:07:32 +0200 (EET)


> I've just noticed a bug with having my scheduler set to 1000Hz (by editing
> /usr/src/linux/include/asm/param.h, of course). Although scheduling does,
> in fact, seem smoother, ps returns that a process has been running longer
> than it really has; in fact, it's by exactly a factor of 10, go figure.
> Just to prove this, I ran the following simple script (PID 1097 is,
> obviously, rc5des):

That is elementary. The running time counts are in JIFFIES,
which are in the HZ units. The 'ps' has 'HZ' compiled in
when it was made. In fact the system does not tell the internal
HZ value out in any easy to use way. So sad.

$ cat /proc/interrupts |grep timer;sleep 1;cat /proc/interrupts |grep timer
8: 75924461 timer
8: 75925508 timer

The delta is 1047 interrupts; HZ at the machine is 1024...

/Matti Aarnio <matti.aarnio@sonera.fi>

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