Subject: Re: CVS commit: syssrc
To: None <source-changes@netbsd.org, toshii@netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: source-changes
Date: 04/16/2001 05:00:28
> Date: Sun, 15 Apr 2001 20:19:33 +0300 (EEST)
>
>
> Module Name:	syssrc
> Committed By:	toshii
> Date:		Sun Apr 15 17:19:33 UTC 2001
>
> Modified Files:
> 	syssrc/sys/arch/hpcarm/sa11x0: sa11x0_ost.c
>
> Log Message:
> Use the second channel to generate 128Hz statclock interrupts.
> top(1) reports more accurate CPU times (user/sys/intr/idle) now.
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.3 -r1.4 syssrc/sys/arch/hpcarm/sa11x0/sa11x0_ost.c

Running statclock at 128 Hz is fine, but this will by default give you a
schedclock() of 32 Hz, which is much too fast. The scheduler only works
right with a schedclock of about 16 Hz.

If you are going to run statclock at anything other than about 64 Hz, you
should probably divide out a schedclock() by yourself, like alpha does.
(Alpha has a 1 kHz statclock().)

See, for example, the uses of schedhz and schedclock under arch/alpha.

What will happen if you don't is that the lower numbered run queues (above
PUSER) won't get used very much by running processes.  All the running ones
will crowd into into the highest queue allowed for their nice(3) level,
regardless of their real scheduler history, because of clipping by
ESTCPULIM().

//ross