summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/vector.s
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-12-03 10:03:19 +0000
committerbde <bde@FreeBSD.org>1994-12-03 10:03:19 +0000
commit40161a97d94886f78fa2f2119f5f507db9cfff2e (patch)
tree1fa19ad4c15094572f0a9da8ecd777e5c961d7be /sys/i386/isa/vector.s
parentd7649fc477570c94eda1ad4d6fd775fc3a22694f (diff)
downloadFreeBSD-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/isa/vector.s')
-rw-r--r--sys/i386/isa/vector.s9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s
index 1bc2324..fcd0a77 100644
--- a/sys/i386/isa/vector.s
+++ b/sys/i386/isa/vector.s
@@ -1,6 +1,6 @@
/*
* from: vector.s, 386BSD 0.1 unknown origin
- * $Id: vector.s,v 1.9 1994/09/20 21:35:49 bde Exp $
+ * $Id: vector.s,v 1.10 1994/11/01 23:29:50 bde Exp $
*/
#include <i386/isa/icu.h>
@@ -147,6 +147,7 @@ IDTVEC(fastintr/**/irq_num) ; \
movl (2+8+1)*4(%esp),%eax ; /* ... cpl from thin frame */ \
pushl %eax ; \
subl $4,%esp ; /* junk for unit number */ \
+ incb _intr_nesting_level ; \
MEXITCOUNT ; \
jmp _doreti
@@ -172,7 +173,7 @@ IDTVEC(intr/**/irq_num) ; \
movl _cpl,%eax ; \
testb $IRQ_BIT(irq_num),%reg ; \
jne 2f ; \
-1: ; \
+ incb _intr_nesting_level ; \
Xresume/**/irq_num: ; \
FAKE_MCOUNT(12*4(%esp)) ; /* XXX late to avoid double count */ \
movl _intr_countp + (irq_num) * 4,%eax ; \
@@ -254,6 +255,10 @@ imasks: /* masks for interrupt handlers */
.space NHWI*4 /* padding; HWI masks are elsewhere */
.long SWI_TTY_MASK, SWI_NET_MASK, 0, 0, 0, 0, 0, 0
.long 0, 0, 0, 0, 0, 0, SWI_CLOCK_MASK, SWI_AST_MASK
+ .globl _intr_nesting_level
+_intr_nesting_level:
+ .byte 0
+ .space 3
/*
* Interrupt counters and names. The format of these and the label names
OpenPOWER on IntegriCloud