diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-13 18:27:38 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-13 18:27:38 +0000 |
commit | a1860f1123d6ff6c0e2ae4d174a3fb1d3e7af930 (patch) | |
tree | 06b8861b479b041d6e2924d0eeb2a96c4d9bd777 /sys/arch/powerpc/include/param.h | |
parent | ade140d2f64c0286ec3f0a8cc5634f5221b420a3 (diff) |
Complete rewrite of the powerpc pmap handling, Instead of keeping
the spill list for each PTEG, the V->P translations are stored in
trees for each pmap. All valid kernel mappings are preallocated
in 1-1 memory so that tlb spill/loads for kernel accesses can be
looked up while physical, user mappings are not guaranteed to
be 1-1 mapped, thus the kernel must go virtual to look up user
mappings. While this is more expensive, the tree search is much
lower cost than the long linked list search. Also on each pmap_remove()
it was necessary to search the linked lists for each possible mapping,
now it just looks up the entry in the tree.
This change gives a 25-36% speedup in 'make build' time. What was
around 2:50 is now around 1:55 on a 733MHz G4.
This change causes a likely existing bug to appear quite often,
it deals with the segment register invalidation in kernel mode.
Because of that problem, currently this change limits the physical
memory used to 256MB. This limitation will be fixed soon, it is not
an error in the pmap code.
* Effort sponsored in part by the Defense Advanced Research Projects
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F30602-01-2-0537.
Diffstat (limited to 'sys/arch/powerpc/include/param.h')
-rw-r--r-- | sys/arch/powerpc/include/param.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/powerpc/include/param.h b/sys/arch/powerpc/include/param.h index 3128717c74a..4d6ecbe46ab 100644 --- a/sys/arch/powerpc/include/param.h +++ b/sys/arch/powerpc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.19 2001/12/05 01:57:15 provos Exp $ */ +/* $OpenBSD: param.h,v 1.20 2002/03/13 18:27:36 drahn Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -122,9 +122,9 @@ */ #define USER_SR 13 #define KERNEL_SR 14 -#define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) -#define EMPTY_SEGMENT 0xfffff0 -#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT)) +#define KERNEL_SEG0 0xfffff0 +#define KERNEL_SEGMENT (KERNEL_SEG0 + KERNEL_SR) +#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHIFT)) /* * Some system constants |