summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-02-25 23:49:51 +0000
committerpeter <peter@FreeBSD.org>2002-02-25 23:49:51 +0000
commit748d0e116728aaecf95d1e3ca10bfe40045b88b8 (patch)
tree0754b996bbf402ca335dd8c6d902bac23f681df8 /sys/amd64/isa
parent06f86e63e411dfaa5655cb6527e06c115aa3e97d (diff)
downloadFreeBSD-src-748d0e116728aaecf95d1e3ca10bfe40045b88b8.zip
FreeBSD-src-748d0e116728aaecf95d1e3ca10bfe40045b88b8.tar.gz
Work-in-progress commit syncing up pmap cleanups that I have been working
on for a while: - fine grained TLB shootdown for SMP on i386 - ranged TLB shootdowns.. eg: specify a range of pages to shoot down with a single IPI, since the IPI is very expensive. Adjust some callers that used to trigger this inside tight loops to do a ranged shootdown at the end instead. - PG_G support for SMP on i386 (options ENABLE_PG_G) - defer PG_G activation till after we decide what we are going to do with PSE and the 4MB pages at the start of the kernel. This should solve some rumored strangeness about stale PG_G entries getting stuck underneath the 4MB pages. - add some instrumentation for the fine TLB shootdown - convert some asm instruction wrappers from functions to inlines. gcc seems to do a fair bit better with this. - [temporarily!] pessimize the tlb shootdown IPI handlers. I will fix this again shortly. This has been working fairly well for me for a while, but I have tweaked it again prior to commit since my last major testing round. The only outstanding problem that I know of is PG_G related, which is why there is an option for it (not on by default for SMP). I have seen a world speedups by a few percent (as much as 4 or 5% in one case) but I have *not* accurately measured this - I am a bit sceptical of these numbers.
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/intr_machdep.c8
-rw-r--r--sys/amd64/isa/intr_machdep.h20
-rw-r--r--sys/amd64/isa/nmi.c8
3 files changed, 13 insertions, 23 deletions
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c
index cfc162b..92bf581 100644
--- a/sys/amd64/isa/intr_machdep.c
+++ b/sys/amd64/isa/intr_machdep.c
@@ -499,14 +499,6 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
}
else {
vector = TPR_SLOW_INTS + intr;
-#ifdef APIC_INTR_REORDER
-#ifdef APIC_INTR_HIGHPRI_CLOCK
- /* XXX: Hack (kludge?) for more accurate clock. */
- if (intr == apic_8254_intr || intr == 8) {
- vector = TPR_FAST_INTS + intr;
- }
-#endif
-#endif
setidt(vector, slowintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
}
diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h
index 1726635..789b02b 100644
--- a/sys/amd64/isa/intr_machdep.h
+++ b/sys/amd64/isa/intr_machdep.h
@@ -88,6 +88,7 @@
/* IDT vector base for regular (aka. slow) and fast interrupts */
#define TPR_SLOW_INTS 0x20
#define TPR_FAST_INTS 0x60
+/* XXX note that the AST interrupt is at 0x50 */
/* blocking values for local APIC Task Priority Register */
#define TPR_BLOCK_HWI 0x4f /* hardware INTs */
@@ -104,20 +105,23 @@
#endif /** TEST_TEST1 */
/* TLB shootdowns */
-#define XINVLTLB_OFFSET (ICU_OFFSET + 112)
+#define XINVLTLB_OFFSET (ICU_OFFSET + 112) /* 0x90 */
+#define XINVLPG_OFFSET (ICU_OFFSET + 113) /* 0x91 */
+#define XINVLRNG_OFFSET (ICU_OFFSET + 114) /* 0x92 */
/* inter-cpu clock handling */
-#define XHARDCLOCK_OFFSET (ICU_OFFSET + 113)
-#define XSTATCLOCK_OFFSET (ICU_OFFSET + 114)
+#define XHARDCLOCK_OFFSET (ICU_OFFSET + 120) /* 0x98 */
+#define XSTATCLOCK_OFFSET (ICU_OFFSET + 121) /* 0x99 */
/* inter-CPU rendezvous */
-#define XRENDEZVOUS_OFFSET (ICU_OFFSET + 115)
+#define XRENDEZVOUS_OFFSET (ICU_OFFSET + 122) /* 0x9A */
/* IPI to generate an additional software trap at the target CPU */
-#define XCPUAST_OFFSET (ICU_OFFSET + 48)
+/* XXX in the middle of the interrupt range, overlapping IRQ48 */
+#define XCPUAST_OFFSET (ICU_OFFSET + 48) /* 0x50 */
/* IPI to signal CPUs to stop and wait for another CPU to restart them */
-#define XCPUSTOP_OFFSET (ICU_OFFSET + 128)
+#define XCPUSTOP_OFFSET (ICU_OFFSET + 128) /* 0xA0 */
/*
* Note: this vector MUST be xxxx1111, 32 + 223 = 255 = 0xff:
@@ -181,7 +185,9 @@ inthand_t
IDTVEC(intr28), IDTVEC(intr29), IDTVEC(intr30), IDTVEC(intr31);
inthand_t
- Xinvltlb, /* TLB shootdowns */
+ Xinvltlb, /* TLB shootdowns - global */
+ Xinvlpg, /* TLB shootdowns - 1 page */
+ Xinvlrng, /* TLB shootdowns - page range */
Xhardclock, /* Forward hardclock() */
Xstatclock, /* Forward statclock() */
Xcpuast, /* Additional software trap on other cpu */
diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c
index cfc162b..92bf581 100644
--- a/sys/amd64/isa/nmi.c
+++ b/sys/amd64/isa/nmi.c
@@ -499,14 +499,6 @@ icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
}
else {
vector = TPR_SLOW_INTS + intr;
-#ifdef APIC_INTR_REORDER
-#ifdef APIC_INTR_HIGHPRI_CLOCK
- /* XXX: Hack (kludge?) for more accurate clock. */
- if (intr == apic_8254_intr || intr == 8) {
- vector = TPR_FAST_INTS + intr;
- }
-#endif
-#endif
setidt(vector, slowintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
}
OpenPOWER on IntegriCloud