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.)
This commit is contained in:
parent
658248453e
commit
e6ce529511
@ -817,13 +817,7 @@ vm_page_alloc(object, pindex, page_req)
|
||||
* 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 @@ vm_page_alloc(object, pindex, page_req)
|
||||
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");
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user