summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-11-10 05:23:19 +0000
committeralc <alc@FreeBSD.org>1999-11-10 05:23:19 +0000
commitf0cd9c6361465095959d33ba2b546c01d4ad1481 (patch)
tree54ce98159cb9408aed4334dc495be3f4c15fd19c /sys
parenteb0978086d5ef277c9bc2b7c5addf2020f8d47d8 (diff)
downloadFreeBSD-src-f0cd9c6361465095959d33ba2b546c01d4ad1481.zip
FreeBSD-src-f0cd9c6361465095959d33ba2b546c01d4ad1481.tar.gz
Two changes: (1) Use vm_page_unqueue_nowakeup in vm_page_alloc
instead of duplicating the code. (2) If a wired page is passed to vm_page_free_toq, panic instead of printing a friendly warning. (If we don't panic here, we'll just panic later in vm_page_unwire obscuring the problem.)
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_page.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 6dfac16..078743f 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -817,13 +817,7 @@ loop:
* Remove from free queue
*/
- {
- struct vpgqueues *pq = &vm_page_queues[m->queue];
-
- TAILQ_REMOVE(&pq->pl, m, pageq);
- (*pq->cnt)--;
- pq->lcnt--;
- }
+ vm_page_unqueue_nowakeup(m);
/*
* Initialize structure. Only the PG_ZERO flag is inherited.
@@ -841,7 +835,6 @@ loop:
m->busy = 0;
m->valid = 0;
KASSERT(m->dirty == 0, ("vm_page_alloc: free/cache page %p was dirty", m));
- m->queue = PQ_NONE;
/*
* vm_page_insert() is safe prior to the splx(). Note also that
@@ -1106,9 +1099,7 @@ vm_page_free_toq(vm_page_t m)
m->wire_count, (long)m->pindex);
}
#endif
- printf("vm_page_free: freeing wired page\n");
- m->wire_count = 0;
- cnt.v_wire_count--;
+ panic("vm_page_free: freeing wired page\n");
}
/*
OpenPOWER on IntegriCloud