From 60ff97b00271edf816a002bc4d7801a871f60b44 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 20 Jun 1999 21:47:02 +0000 Subject: [PATCH] Remove vm_object::cache_count and vm_object::wired_count. They are not used. (Nor is there any planned use by John who introduced them.) Reviewed by: "John S. Dyson" --- sys/vm/vm_object.c | 4 +--- sys/vm/vm_object.h | 4 +--- sys/vm/vm_page.c | 27 +-------------------------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 010ea28f76a7..ceffb966ab10 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.155 1999/05/28 03:39:44 alc Exp $ + * $Id: vm_object.c,v 1.156 1999/05/30 01:12:19 alc Exp $ */ /* @@ -157,8 +157,6 @@ _vm_object_allocate(type, size, object) object->behavior = OBJ_NORMAL; object->paging_in_progress = 0; object->resident_page_count = 0; - object->cache_count = 0; - object->wire_count = 0; object->shadow_count = 0; object->pg_color = next_index; if ( size > (PQ_L2_SIZE / 3 + PQ_PRIME1)) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 0fb7c5e58e85..2bb42e16c274 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.h,v 1.54 1999/02/08 19:00:15 dillon Exp $ + * $Id: vm_object.h,v 1.55 1999/06/19 18:42:52 alc Exp $ */ /* @@ -100,8 +100,6 @@ struct vm_object { u_short paging_in_progress; /* Paging (in or out) so don't collapse or destroy */ u_short behavior; /* see below */ int resident_page_count; /* number of resident pages */ - int cache_count; /* number of cached pages */ - int wire_count; /* number of wired pages */ struct vm_object *backing_object; /* object that I'm a shadow of */ vm_ooffset_t backing_object_offset;/* Offset in backing object */ vm_offset_t last_read; /* last read in object -- detect seq behavior */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index bde9c1b7e1f3..9b9835388e23 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.130 1999/05/02 23:57:13 alc Exp $ + * $Id: vm_page.c,v 1.131 1999/06/20 04:55:27 alc Exp $ */ /* @@ -411,12 +411,6 @@ vm_page_insert(m, object, pindex) TAILQ_INSERT_TAIL(&object->memq, m, listq); m->object->generation++; - if (m->wire_count) - object->wire_count++; - - if ((m->queue - m->pc) == PQ_CACHE) - object->cache_count++; - /* * show that the object has one more resident page. */ @@ -467,12 +461,6 @@ vm_page_remove(m) object = m->object; - if (m->wire_count) - object->wire_count--; - - if ((m->queue - m->pc) == PQ_CACHE) - object->cache_count--; - /* * Remove from the object_object/offset hash table. The object * must be on the hash queue, we will panic if it isn't @@ -619,10 +607,6 @@ vm_page_unqueue_nowakeup(m) TAILQ_REMOVE(pq->pl, m, pageq); (*pq->cnt)--; (*pq->lcnt)--; - if ((queue - m->pc) == PQ_CACHE) { - if (m->object) - m->object->cache_count--; - } } } @@ -651,8 +635,6 @@ vm_page_unqueue(m) if ((cnt.v_cache_count + cnt.v_free_count) < (cnt.v_free_reserved + cnt.v_cache_min)) pagedaemon_wakeup(); - if (m->object) - m->object->cache_count--; } } } @@ -1158,8 +1140,6 @@ vm_page_free_toq(vm_page_t m) #endif printf("vm_page_free: freeing wired page\n"); m->wire_count = 0; - if (m->object) - m->object->wire_count--; cnt.v_wire_count--; } @@ -1236,8 +1216,6 @@ vm_page_wire(m) if (m->wire_count == 0) { vm_page_unqueue(m); cnt.v_wire_count++; - if (m->object) - m->object->wire_count++; } m->wire_count++; splx(s); @@ -1282,8 +1260,6 @@ vm_page_unwire(m, activate) if (m->wire_count > 0) { m->wire_count--; if (m->wire_count == 0) { - if (m->object) - m->object->wire_count--; cnt.v_wire_count--; if (activate) { TAILQ_INSERT_TAIL(&vm_page_queue_active, m, pageq); @@ -1376,7 +1352,6 @@ vm_page_cache(m) (*vm_page_queues[m->queue].lcnt)++; TAILQ_INSERT_TAIL(vm_page_queues[m->queue].pl, m, pageq); cnt.v_cache_count++; - m->object->cache_count++; vm_page_free_wakeup(); splx(s); }