Subject: Re: cp_time interrupt ticks
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: tech-kern
Date: 02/28/1999 23:05:36
On Sun, Feb 28, 1999 at 02:59:00PM -0800, Jonathan Stone wrote:
> 
> ...  There's nothing stopping you from just updating the i386-specific
> CLKF_INTR to use your new global variable, and committing this (or
> sending a change-request PR) for the i386. that would be Really Cool.

  I can send in a PR, but I am not qualified to actually do the
changes -- I have no idea precisely where the inc and dec
should be placed -- before or after setting the new int mask,
etc.

> I dont see how this'd extend to a multiprocessor; is a global variable
> really the right thing for CLKF_INTR()?  In general, I dont think so.

  How is cp_time updated for a multiprocessor?  Does a stathz
interrupt update cp_time according to the current state of the
4, say, processors, or are there 4 different stathz interrupts,
one per CPU?  I think using an _array_ of intr_nesting_level counters,
one per CPU, would probably do the job in either case, but as
mentioned earlier, this is all over my head!

> And somene should fix systat ps, so that instead of the braindead
> load-average "histogram" it shows interrupt and system time. :)

  Do you mean a la top (53% user, 20% system, 3% interrupt, 24%
idle)?  _That's_ something I could handle doing myself!

  Brian