diff options
author | alc <alc@FreeBSD.org> | 1999-07-31 18:31:00 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-07-31 18:31:00 +0000 |
commit | 5180aa1c5c9950d51f72a4c21d43544c07c97982 (patch) | |
tree | 435d06110c1bad9ad49076fd31d4186952e8c59f /sys/vm | |
parent | 2e30179cc4797fc65a838b8c84b5c62416f6d9f2 (diff) | |
download | FreeBSD-src-5180aa1c5c9950d51f72a4c21d43544c07c97982.zip FreeBSD-src-5180aa1c5c9950d51f72a4c21d43544c07c97982.tar.gz |
Change the type of vpgqueues::lcnt from "int *" to "int". The indirection
served no purpose.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 34 | ||||
-rw-r--r-- | sys/vm/vm_page.h | 4 |
2 files changed, 18 insertions, 20 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index e6b04fa..b34c34b 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.134 1999/07/01 19:53:42 peter Exp $ + * $Id: vm_page.c,v 1.135 1999/07/31 04:19:49 alc Exp $ */ /* @@ -105,7 +105,6 @@ struct pglist vm_page_queue_inactive = {0}; struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {{0}}; struct vpgqueues vm_page_queues[PQ_COUNT] = {{0}}; -static int pqcnt[PQ_COUNT] = {0}; static void vm_page_queue_init(void) { @@ -130,7 +129,6 @@ vm_page_queue_init(void) { } else { panic("vm_page_queue_init: queue %d is null", i); } - vm_page_queues[i].lcnt = &pqcnt[i]; } } @@ -320,7 +318,7 @@ vm_page_startup(starta, enda, vaddr) m->pc = (pa >> PAGE_SHIFT) & PQ_L2_MASK; m->queue = m->pc + PQ_FREE; TAILQ_INSERT_HEAD(vm_page_queues[m->queue].pl, m, pageq); - ++(*vm_page_queues[m->queue].lcnt); + vm_page_queues[m->queue].lcnt++; pa += PAGE_SIZE; } } @@ -591,7 +589,7 @@ vm_page_unqueue_nowakeup(m) m->queue = PQ_NONE; TAILQ_REMOVE(pq->pl, m, pageq); (*pq->cnt)--; - (*pq->lcnt)--; + pq->lcnt--; } } @@ -615,7 +613,7 @@ vm_page_unqueue(m) pq = &vm_page_queues[queue]; TAILQ_REMOVE(pq->pl, m, pageq); (*pq->cnt)--; - (*pq->lcnt)--; + pq->lcnt--; if ((queue - m->pc) == PQ_CACHE) { if ((cnt.v_cache_count + cnt.v_free_count) < (cnt.v_free_reserved + cnt.v_cache_min)) @@ -839,7 +837,7 @@ loop: TAILQ_REMOVE(pq->pl, m, pageq); (*pq->cnt)--; - (*pq->lcnt)--; + pq->lcnt--; } /* @@ -1012,7 +1010,7 @@ vm_page_activate(m) if (m->wire_count == 0) { m->queue = PQ_ACTIVE; - ++(*vm_page_queues[PQ_ACTIVE].lcnt); + vm_page_queues[PQ_ACTIVE].lcnt++; TAILQ_INSERT_TAIL(&vm_page_queue_active, m, pageq); if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; @@ -1153,7 +1151,7 @@ vm_page_free_toq(vm_page_t m) m->queue = PQ_FREE + m->pc; pq = &vm_page_queues[m->queue]; - ++(*pq->lcnt); + pq->lcnt++; ++(*pq->cnt); /* @@ -1248,12 +1246,12 @@ vm_page_unwire(m, activate) if (activate) { TAILQ_INSERT_TAIL(&vm_page_queue_active, m, pageq); m->queue = PQ_ACTIVE; - (*vm_page_queues[PQ_ACTIVE].lcnt)++; + vm_page_queues[PQ_ACTIVE].lcnt++; cnt.v_active_count++; } else { TAILQ_INSERT_TAIL(&vm_page_queue_inactive, m, pageq); m->queue = PQ_INACTIVE; - (*vm_page_queues[PQ_INACTIVE].lcnt)++; + vm_page_queues[PQ_INACTIVE].lcnt++; cnt.v_inactive_count++; } } @@ -1291,7 +1289,7 @@ vm_page_deactivate(m) vm_page_unqueue(m); TAILQ_INSERT_TAIL(&vm_page_queue_inactive, m, pageq); m->queue = PQ_INACTIVE; - ++(*vm_page_queues[PQ_INACTIVE].lcnt); + vm_page_queues[PQ_INACTIVE].lcnt++; cnt.v_inactive_count++; } splx(s); @@ -1334,7 +1332,7 @@ vm_page_cache(m) s = splvm(); vm_page_unqueue_nowakeup(m); m->queue = PQ_CACHE + m->pc; - (*vm_page_queues[m->queue].lcnt)++; + vm_page_queues[m->queue].lcnt++; TAILQ_INSERT_TAIL(vm_page_queues[m->queue].pl, m, pageq); cnt.v_cache_count++; vm_page_free_wakeup(); @@ -1768,7 +1766,7 @@ again1: } TAILQ_REMOVE(vm_page_queues[m->queue].pl, m, pageq); - (*vm_page_queues[m->queue].lcnt)--; + vm_page_queues[m->queue].lcnt--; cnt.v_free_count--; m->valid = VM_PAGE_BITS_ALL; m->flags = 0; @@ -1860,18 +1858,18 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info) int i; db_printf("PQ_FREE:"); for(i=0;i<PQ_L2_SIZE;i++) { - db_printf(" %d", *vm_page_queues[PQ_FREE + i].lcnt); + db_printf(" %d", vm_page_queues[PQ_FREE + i].lcnt); } db_printf("\n"); db_printf("PQ_CACHE:"); for(i=0;i<PQ_L2_SIZE;i++) { - db_printf(" %d", *vm_page_queues[PQ_CACHE + i].lcnt); + db_printf(" %d", vm_page_queues[PQ_CACHE + i].lcnt); } db_printf("\n"); db_printf("PQ_ACTIVE: %d, PQ_INACTIVE: %d\n", - *vm_page_queues[PQ_ACTIVE].lcnt, - *vm_page_queues[PQ_INACTIVE].lcnt); + vm_page_queues[PQ_ACTIVE].lcnt, + vm_page_queues[PQ_INACTIVE].lcnt); } #endif /* DDB */ diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 70920b7..e91928c 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.62 1999/06/22 07:18:20 alc Exp $ + * $Id: vm_page.h,v 1.63 1999/07/22 06:04:17 alc Exp $ */ /* @@ -197,7 +197,7 @@ struct vm_page { extern struct vpgqueues { struct pglist *pl; int *cnt; - int *lcnt; + int lcnt; } vm_page_queues[PQ_COUNT]; #endif |