diff options
author | peter <peter@FreeBSD.org> | 2002-07-12 07:56:11 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-12 07:56:11 +0000 |
commit | 4d88d6566a61c3b7598a583389954ccba701acb4 (patch) | |
tree | 8b641ea8c1ce08eac805ae6a630e6c6139bca09e /sys/amd64/isa | |
parent | 1f5fc25e7a1ee9121499c0d6196dea011c1dc6e1 (diff) | |
download | FreeBSD-src-4d88d6566a61c3b7598a583389954ccba701acb4.zip FreeBSD-src-4d88d6566a61c3b7598a583389954ccba701acb4.tar.gz |
Revive backed out pmap related changes from Feb 2002. The highlights are:
- It actually works this time, honest!
- Fine grained TLB shootdowns for SMP on i386. IPI's are very expensive,
so try and optimize things where possible.
- Introduce ranged shootdowns that can be done as a single IPI.
- PG_G support for i386
- Specific-cpu targeted shootdowns. For example, there is no sense in
globally purging the TLB cache for where we are stealing a page from
the local unshared process on the local cpu. Use pm_active to track
this.
- Add some instrumentation for the tlb shootdown code.
- Rip out SMP code from <machine/cpufunc.h>
- Try and fix some very bogus PG_G and PG_PS interactions that were bad
enough to cause vm86 bios calls to break. vm86 depended on our existing
bugs and this was the cause of the VESA panics last time.
- Fix the silly one-line error that caused the 'panic: bad pte' last time.
- Fix a couple of other silly one-line errors that should have caused more
pain than they did.
Some more work is needed:
- pmap_{zero,copy}_page[_idle]. These can be done without IPI's if we
have a hook in cpu_switch.
- The IPI handlers need some cleanup. I have a bogus %ds load that can
be avoided.
- APTD handling is rather bogus and appears to be a large source of
global TLB IPI shootdowns for no really good reason.
I see speedups of between 1.5% and ~4% on buildworlds in a while 1 loop.
I expect to see a bigger difference when there is significant pageout
activity or the system otherwise has memory shortages.
I have backed out a few optimizations that I had been using over the last
few days in order to be a little more conservative. I'll revisit these
again over the next few days as the dust settles.
New option: DISABLE_PG_G - In case I missed something.
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r-- | sys/amd64/isa/intr_machdep.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h index 41542d0..7179268 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: @@ -194,7 +198,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 */ |