summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-11-17 02:38:31 +0000
committerdyson <dyson@FreeBSD.org>1996-11-17 02:38:31 +0000
commit2383152fd5e318242076cf1011e1c9bd9367262e (patch)
tree76db49f4ff238eb118aecba8ba06dc170713aa45 /sys/vm
parente3484cdbc1de6605c8c37fbdb2e55cfa25913db9 (diff)
downloadFreeBSD-src-2383152fd5e318242076cf1011e1c9bd9367262e.zip
FreeBSD-src-2383152fd5e318242076cf1011e1c9bd9367262e.tar.gz
Improve the locality of reference for variables in vm_page and
vm_kern by moving them from .bss to .data. With this change, there is a measurable perf improvement in fork/exec.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_kern.c28
-rw-r--r--sys/vm/vm_page.c26
2 files changed, 27 insertions, 27 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 5b117b0..1c564be 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_kern.c,v 1.26 1996/05/23 02:24:55 dyson Exp $
+ * $Id: vm_kern.c,v 1.27 1996/07/02 02:08:02 dyson Exp $
*/
/*
@@ -89,19 +89,19 @@
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
-vm_map_t buffer_map;
-vm_map_t kernel_map;
-vm_map_t kmem_map;
-vm_map_t mb_map;
-int mb_map_full;
-vm_map_t mcl_map;
-int mcl_map_full;
-vm_map_t io_map;
-vm_map_t clean_map;
-vm_map_t phys_map;
-vm_map_t exec_map;
-vm_map_t exech_map;
-vm_map_t u_map;
+vm_map_t kernel_map=0;
+vm_map_t kmem_map=0;
+vm_map_t exec_map=0;
+vm_map_t exech_map=0;
+vm_map_t clean_map=0;
+vm_map_t u_map=0;
+vm_map_t buffer_map=0;
+vm_map_t mb_map=0;
+int mb_map_full=0;
+vm_map_t mcl_map=0;
+int mcl_map_full=0;
+vm_map_t io_map=0;
+vm_map_t phys_map=0;
/*
* kmem_alloc_pageable:
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index ea5c4ea..ea0e139 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
- * $Id: vm_page.c,v 1.69 1996/10/15 03:16:45 dyson Exp $
+ * $Id: vm_page.c,v 1.70 1996/11/05 04:19:08 dyson Exp $
*/
/*
@@ -98,16 +98,16 @@ static struct pglist *vm_page_buckets; /* Array of buckets */
static int vm_page_bucket_count; /* How big is array? */
static int vm_page_hash_mask; /* Mask for hash function */
-struct pglist vm_page_queue_free[PQ_L2_SIZE];
-struct pglist vm_page_queue_zero[PQ_L2_SIZE];
-struct pglist vm_page_queue_active;
-struct pglist vm_page_queue_inactive;
-struct pglist vm_page_queue_cache[PQ_L2_SIZE];
+struct pglist vm_page_queue_free[PQ_L2_SIZE] = {0};
+struct pglist vm_page_queue_zero[PQ_L2_SIZE] = {0};
+struct pglist vm_page_queue_active = {0};
+struct pglist vm_page_queue_inactive = {0};
+struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {0};
-int no_queue;
+int no_queue=0;
-struct vpgqueues vm_page_queues[PQ_COUNT];
-int pqcnt[PQ_COUNT];
+struct vpgqueues vm_page_queues[PQ_COUNT] = {0};
+int pqcnt[PQ_COUNT] = {0};
static void
vm_page_queue_init(void) {
@@ -142,13 +142,13 @@ vm_page_queue_init(void) {
}
}
-vm_page_t vm_page_array;
-int vm_page_array_size;
-long first_page;
+vm_page_t vm_page_array = 0;
+int vm_page_array_size = 0;
+long first_page = 0;
static long last_page;
static vm_size_t page_mask;
static int page_shift;
-int vm_page_zero_count;
+int vm_page_zero_count = 0;
/*
* map of contiguous valid DEV_BSIZE chunks in a page
OpenPOWER on IntegriCloud