diff options
author | alc <alc@FreeBSD.org> | 1999-07-31 04:19:49 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-07-31 04:19:49 +0000 |
commit | 5c6321aca51ee4e4072274346b7df710d5cb6b5b (patch) | |
tree | ed977884897d4c010c47fd6987c6deb69327b011 /sys/vm | |
parent | 20a1bb96df3333bed25219a4a84b459d16bb0243 (diff) | |
download | FreeBSD-src-5c6321aca51ee4e4072274346b7df710d5cb6b5b.zip FreeBSD-src-5c6321aca51ee4e4072274346b7df710d5cb6b5b.tar.gz |
vm_page_queue_init:
Remove the initialization of PQ_NONE's cnt and lcnt. They aren't
used.
vm_page_insert:
Remove an unnecessary dereference.
vm_page_wire:
Remove the one and only (and thus pointless) reference
to PQ_NONE's lcnt.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0a50fae..e6b04fa 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.133 1999/06/22 07:18:17 alc Exp $ + * $Id: vm_page.c,v 1.134 1999/07/01 19:53:42 peter Exp $ */ /* @@ -104,8 +104,6 @@ struct pglist vm_page_queue_active = {0}; struct pglist vm_page_queue_inactive = {0}; struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {{0}}; -static int no_queue=0; - struct vpgqueues vm_page_queues[PQ_COUNT] = {{0}}; static int pqcnt[PQ_COUNT] = {0}; @@ -113,8 +111,6 @@ static void vm_page_queue_init(void) { int i; - vm_page_queues[PQ_NONE].pl = NULL; - vm_page_queues[PQ_NONE].cnt = &no_queue; for(i=0;i<PQ_L2_SIZE;i++) { vm_page_queues[PQ_FREE+i].pl = &vm_page_queue_free[i]; vm_page_queues[PQ_FREE+i].cnt = &cnt.v_free_count; @@ -128,10 +124,10 @@ vm_page_queue_init(void) { vm_page_queues[PQ_CACHE+i].pl = &vm_page_queue_cache[i]; vm_page_queues[PQ_CACHE+i].cnt = &cnt.v_cache_count; } - for(i=0;i<PQ_COUNT;i++) { + for(i=PQ_FREE;i<PQ_COUNT;i++) { if (vm_page_queues[i].pl) { TAILQ_INIT(vm_page_queues[i].pl); - } else if (i != 0) { + } else { panic("vm_page_queue_init: queue %d is null", i); } vm_page_queues[i].lcnt = &pqcnt[i]; @@ -398,7 +394,7 @@ vm_page_insert(m, object, pindex) */ TAILQ_INSERT_TAIL(&object->memq, m, listq); - m->object->generation++; + object->generation++; /* * show that the object has one more resident page. @@ -1208,7 +1204,6 @@ vm_page_wire(m) } m->wire_count++; splx(s); - (*vm_page_queues[PQ_NONE].lcnt)++; vm_page_flag_set(m, PG_MAPPED); } |