Hold the page queues lock around calls to vm_page_flag_clear() and

vm_page_wakeup().
This commit is contained in:
alc 2002-12-28 21:14:44 +00:00
parent c46acaed85
commit f9a17edba9

View File

@ -964,9 +964,11 @@ pmap_new_thread(struct thread *td, int pages)
VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
vm_page_lock_queues();
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
m->valid = VM_PAGE_BITS_ALL;
vm_page_unlock_queues();
}
/*
@ -1144,9 +1146,11 @@ pmap_pinit(pmap_t pm)
if ((m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
vm_page_lock_queues();
vm_page_flag_clear(m, PG_BUSY);
m->valid = VM_PAGE_BITS_ALL;
m->md.pmap = pm;
vm_page_unlock_queues();
ma[i] = m;
}