Subject: CPU stats showing hard-interrupt context vs. soft-interrupt context?
To: Frank van der Linden <fvdl@netbsd.org>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 06/02/2005 13:02:45
Tonnerrre's (<tonnerre@thundrix.ch>) recent messages about moving
soft-interrupt context out from under the kernel big-lock reminded me
of an idea I've had on and off for several years:

What would it take to separately account for and record CPU time,
for hard-interrupt versus soft-interrupt context?

The kern.cp_time cAPI currently used by top and systat isn't very
amenable to this split.  The notion I had last time was to add a new
field (or new sysctl node, which can grow to allow separate info for
different softint levels?)  which records time charged against
soft-interrupt state.  Apps not aware of the new API would report the
old "interrupt" time; apps aware of the new API can fetch the soft-int
time, show it, and deduct it from the "interrupt" time.

Comments? Any interest?

Frank, Stephan, others: my current platform of interest is i386 (and
very soon, amd64). What'd it take to implement separate CPU-time
accounting for x86?