diff options
author | alc <alc@FreeBSD.org> | 1999-08-12 21:16:53 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-08-12 21:16:53 +0000 |
commit | 17f88167e47bbc101c878443b88d983d59148f18 (patch) | |
tree | 110b66e696961a877ca0c0b7dbbbcc836d0f2fce /sys/vm | |
parent | aaa441c4482defa40f8bc4596c0945dc880978b0 (diff) | |
download | FreeBSD-src-17f88167e47bbc101c878443b88d983d59148f18.zip FreeBSD-src-17f88167e47bbc101c878443b88d983d59148f18.tar.gz |
Make the default page coloring parameters match a (non-Xeon) Pentium II/III.
This setting is also acceptable for Celerons and Pentium Pros
with less than 1MB L2 caches.
Note: PQ_L2_SIZE is a misnomer. The correct number of colors is
a function of the cache's degree of associativity as well as its size.
Submitted by: bde and alc
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index e91928c..5e9ce24 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_page.h,v 1.63 1999/07/22 06:04:17 alc Exp $ + * $Id: vm_page.h,v 1.64 1999/07/31 18:31:00 alc Exp $ */ /* @@ -179,12 +179,18 @@ struct vm_page { #define PQ_L2_SIZE 16 /* A reasonable number of colors (opt for 64K cache) */ #endif -#if defined(PQ_MEDIUMCACHE) || !defined(PQ_L2_SIZE) +#if defined(PQ_MEDIUMCACHE) #define PQ_PRIME1 13 /* Prime number somewhat less than PQ_HASH_SIZE */ #define PQ_PRIME2 7 /* Prime number somewhat less than PQ_HASH_SIZE */ #define PQ_L2_SIZE 64 /* A number of colors opt for 256K cache */ #endif +#if !defined(PQ_L2_SIZE) +#define PQ_PRIME1 9 /* Produces a good PQ_L2_SIZE/3 + PQ_PRIME1 */ +#define PQ_PRIME2 5 /* Prime number somewhat less than PQ_HASH_SIZE */ +#define PQ_L2_SIZE 32 /* 512KB or smaller, 4-way set-associative cache */ +#endif + #define PQ_L2_MASK (PQ_L2_SIZE - 1) #define PQ_NONE 0 |