diff options
author | bde <bde@FreeBSD.org> | 1994-12-03 10:03:19 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-12-03 10:03:19 +0000 |
commit | 40161a97d94886f78fa2f2119f5f507db9cfff2e (patch) | |
tree | 1fa19ad4c15094572f0a9da8ecd777e5c961d7be /sys/i386/include/cpu.h | |
parent | d7649fc477570c94eda1ad4d6fd775fc3a22694f (diff) | |
download | FreeBSD-src-40161a97d94886f78fa2f2119f5f507db9cfff2e.zip FreeBSD-src-40161a97d94886f78fa2f2119f5f507db9cfff2e.tar.gz |
i386/exception.s,
Keep track of interrupt nesting level. It is normally 0
for syscalls and traps, but is fudged to 1 for their exit
processing in case they metamorphose into an interrupt
handler.
i386/genassym.c;
Remove support for the obsolete pcb_iml and pcb_cmap2.
Add support for pcb_inl.
i386/swtch.s:
Fudge the interrupt nesting level across context switches and in
the idle loop so that the work for preemptive context switches
gets counted as interrupt time, the work for voluntary context
switches gets counted mostly as system time (the part when
curproc == 0 gets counted as interrupt time), and only truly idle
time gets counted as idle time.
Remove obsolete support (commented out and otherwise) for pcb_iml.
Load curpcb just before curproc instead of just after so that
curpcb is always valid if curproc is. A few more changes like
this may fix tracing through context switches.
Remove obsolete function swtch_to_inactive().
include/cpu.h:
Use the new interrupt nesting level variable to implement a
non-fake CLF_INTR() so that accounting for the interrupt state
works.
You can use top, iostat or (best) an up to date systat to see
interrupt overheads. I see the expected huge interrupt overheads
for ISA devices (on a 486DX/33, about 55% for an IDE drive
transferring 1250K/sec and the same for a WD8013EBT network card
transferring 1100K/sec). The huge interrupt overheads for serial
devices are unfortunately normally invisible.
include/pcb.h:
Remove the obsolete pcb_iml and pcb_cmap2. Replace them by
padding to preserve binary compatibility.
Use part of the new padding for pcb_inl.
isa/icu.s:
isa/vector.s:
Keep track of interrupt nesting level.
Diffstat (limited to 'sys/i386/include/cpu.h')
-rw-r--r-- | sys/i386/include/cpu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index 79c80af..5d4ce70 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $Id: cpu.h,v 1.16 1994/11/05 22:44:34 bde Exp $ + * $Id: cpu.h,v 1.17 1994/11/26 09:27:58 phk Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -58,8 +58,8 @@ #define cpu_set_init_frame(p, fp) (p)->p_md.md_regs = fp #define CLKF_USERMODE(framep) (ISPL((framep)->cf_cs) == SEL_UPL) -#define CLKF_INTR(framep) (0) -#if 0 +#define CLKF_INTR(framep) (intr_nesting_level >= 2) +#if 1 /* * XXX splsoftclock() is very broken and barely worth fixing. It doesn't * turn off the clock bit in imen or in the icu. (This is not a serious @@ -127,6 +127,7 @@ struct cpu_nameclass { extern int bootverbose; extern int cpu; extern int cpu_class; +extern u_char intr_nesting_level; extern struct cpu_nameclass i386_cpus[]; extern int want_resched; /* resched was called */ |