vm_page.h (9c89c228fe21b36b1b89ed6ce60b0707992330b1) vm_page.h (3b2134830159498ce172db6b3725c593ab02c864)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
64 * $Id: vm_page.h,v 1.61 1999/06/19 18:42:53 alc Exp $
64 * $Id: vm_page.h,v 1.62 1999/06/22 07:18:20 alc Exp $
65 */
66
67/*
68 * Resident memory system definitions.
69 */
70
71#ifndef _VM_PAGE_
72#define _VM_PAGE_

--- 75 unchanged lines hidden (view full) ---

148 * Page coloring parameters
149 */
150/* Each of PQ_FREE, and PQ_CACHE have PQ_HASH_SIZE entries */
151
152/* Define one of the following */
153#if defined(PQ_HUGECACHE)
154#define PQ_PRIME1 31 /* Prime number somewhat less than PQ_HASH_SIZE */
155#define PQ_PRIME2 23 /* Prime number somewhat less than PQ_HASH_SIZE */
65 */
66
67/*
68 * Resident memory system definitions.
69 */
70
71#ifndef _VM_PAGE_
72#define _VM_PAGE_

--- 75 unchanged lines hidden (view full) ---

148 * Page coloring parameters
149 */
150/* Each of PQ_FREE, and PQ_CACHE have PQ_HASH_SIZE entries */
151
152/* Define one of the following */
153#if defined(PQ_HUGECACHE)
154#define PQ_PRIME1 31 /* Prime number somewhat less than PQ_HASH_SIZE */
155#define PQ_PRIME2 23 /* Prime number somewhat less than PQ_HASH_SIZE */
156#define PQ_PRIME3 17 /* Prime number somewhat less than PQ_HASH_SIZE */
157#define PQ_L2_SIZE 256 /* A number of colors opt for 1M cache */
158#endif
159
160/* Define one of the following */
161#if defined(PQ_LARGECACHE)
162#define PQ_PRIME1 31 /* Prime number somewhat less than PQ_HASH_SIZE */
163#define PQ_PRIME2 23 /* Prime number somewhat less than PQ_HASH_SIZE */
156#define PQ_L2_SIZE 256 /* A number of colors opt for 1M cache */
157#endif
158
159/* Define one of the following */
160#if defined(PQ_LARGECACHE)
161#define PQ_PRIME1 31 /* Prime number somewhat less than PQ_HASH_SIZE */
162#define PQ_PRIME2 23 /* Prime number somewhat less than PQ_HASH_SIZE */
164#define PQ_PRIME3 17 /* Prime number somewhat less than PQ_HASH_SIZE */
165#define PQ_L2_SIZE 128 /* A number of colors opt for 512K cache */
166#endif
167
168
169/*
170 * Use 'options PQ_NOOPT' to disable page coloring
171 */
172#if defined(PQ_NOOPT)
173#define PQ_PRIME1 1
174#define PQ_PRIME2 1
163#define PQ_L2_SIZE 128 /* A number of colors opt for 512K cache */
164#endif
165
166
167/*
168 * Use 'options PQ_NOOPT' to disable page coloring
169 */
170#if defined(PQ_NOOPT)
171#define PQ_PRIME1 1
172#define PQ_PRIME2 1
175#define PQ_PRIME3 1
176#define PQ_L2_SIZE 1
177#endif
178
179#if defined(PQ_NORMALCACHE)
180#define PQ_PRIME1 5 /* Prime number somewhat less than PQ_HASH_SIZE */
181#define PQ_PRIME2 3 /* Prime number somewhat less than PQ_HASH_SIZE */
173#define PQ_L2_SIZE 1
174#endif
175
176#if defined(PQ_NORMALCACHE)
177#define PQ_PRIME1 5 /* Prime number somewhat less than PQ_HASH_SIZE */
178#define PQ_PRIME2 3 /* Prime number somewhat less than PQ_HASH_SIZE */
182#define PQ_PRIME3 11 /* Prime number somewhat less than PQ_HASH_SIZE */
183#define PQ_L2_SIZE 16 /* A reasonable number of colors (opt for 64K cache) */
184#endif
185
186#if defined(PQ_MEDIUMCACHE) || !defined(PQ_L2_SIZE)
187#define PQ_PRIME1 13 /* Prime number somewhat less than PQ_HASH_SIZE */
188#define PQ_PRIME2 7 /* Prime number somewhat less than PQ_HASH_SIZE */
179#define PQ_L2_SIZE 16 /* A reasonable number of colors (opt for 64K cache) */
180#endif
181
182#if defined(PQ_MEDIUMCACHE) || !defined(PQ_L2_SIZE)
183#define PQ_PRIME1 13 /* Prime number somewhat less than PQ_HASH_SIZE */
184#define PQ_PRIME2 7 /* Prime number somewhat less than PQ_HASH_SIZE */
189#define PQ_PRIME3 5 /* Prime number somewhat less than PQ_HASH_SIZE */
190#define PQ_L2_SIZE 64 /* A number of colors opt for 256K cache */
191#endif
192
193#define PQ_L2_MASK (PQ_L2_SIZE - 1)
194
195#define PQ_NONE 0
196#define PQ_FREE 1
185#define PQ_L2_SIZE 64 /* A number of colors opt for 256K cache */
186#endif
187
188#define PQ_L2_MASK (PQ_L2_SIZE - 1)
189
190#define PQ_NONE 0
191#define PQ_FREE 1
197/* #define PQ_ZERO (1 + PQ_L2_SIZE) */
198#define PQ_INACTIVE (1 + 1*PQ_L2_SIZE)
199#define PQ_ACTIVE (2 + 1*PQ_L2_SIZE)
200#define PQ_CACHE (3 + 1*PQ_L2_SIZE)
201#define PQ_COUNT (3 + 2*PQ_L2_SIZE)
202
203extern struct vpgqueues {
204 struct pglist *pl;
205 int *cnt;

--- 387 unchanged lines hidden ---
192#define PQ_INACTIVE (1 + 1*PQ_L2_SIZE)
193#define PQ_ACTIVE (2 + 1*PQ_L2_SIZE)
194#define PQ_CACHE (3 + 1*PQ_L2_SIZE)
195#define PQ_COUNT (3 + 2*PQ_L2_SIZE)
196
197extern struct vpgqueues {
198 struct pglist *pl;
199 int *cnt;

--- 387 unchanged lines hidden ---