Messages in this thread | | | Date | Fri, 22 Jan 1999 02:19:39 -0700 (MST) | From | Quantum Porcupine <> | Subject | Re: Scheduler set to 1000Hz |
| |
On Fri, 22 Jan 1999, Matti Aarnio wrote:
> > 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.
Ah, I see... is there any way for the ps/top/etc. utilities to get at the HZ rate so this behaviour can be fixed?
> $ 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...
Yeah, this makes sense, definitely. I suppose a ps binary could try to work out the jiffy rate from that, but it'd be inaccurate at best (mine at 1000 returns 1013 interrupts).
I guess I can just deal with it and remember to divide by 10.
- 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/
| |