aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/pcb.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1994-12-03 10:03:19 +0000
committerBruce Evans <bde@FreeBSD.org>1994-12-03 10:03:19 +0000
commitb39b673d37b7fc2a38605d3780466c8a8830712c (patch)
tree1fa19ad4c15094572f0a9da8ecd777e5c961d7be /sys/amd64/include/pcb.h
parent46953c1291b20830de7c7ac8dd19213b8c1bd7d6 (diff)
downloadsrc-b39b673d37b7fc2a38605d3780466c8a8830712c.tar.gz
src-b39b673d37b7fc2a38605d3780466c8a8830712c.zip
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.
Notes
Notes: svn path=/head/; revision=4929
Diffstat (limited to 'sys/amd64/include/pcb.h')
-rw-r--r--sys/amd64/include/pcb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 37b76f85832d..8ce7febb5ada 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
- * $Id: pcb.h,v 1.6 1994/08/13 03:49:50 wollman Exp $
+ * $Id: pcb.h,v 1.7 1994/10/08 22:21:33 phk Exp $
*/
#ifndef _I386_PCB_H_
@@ -73,10 +73,10 @@ struct pcb {
#endif
#define FP_USESEMC 0x08 /* process uses EMC memory-mapped mode */
#define FP_SOFTFP 0x20 /* process using software fltng pnt emulator */
- short pcb_iml; /* interrupt mask level */
+ u_char pcb_inl; /* intr_nesting_level at context switch */
caddr_t pcb_onfault; /* copyin/out fault recovery */
long pcb_sigc[8]; /* XXX signal code trampoline */
- int pcb_cmap2; /* XXX temporary PTE - will prefault instead */
+ int pad2; /* XXX unused - remove it if you change struct */
};
/*