Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().

This commit is contained in:
Alan Cox 2004-10-24 18:46:32 +00:00
parent 8bf62bdadb
commit ddf4bb37c8
2 changed files with 3 additions and 11 deletions

View File

@ -262,14 +262,10 @@ vm_proc_new(struct proc *p)
p->p_upages_obj = upobj;
VM_OBJECT_LOCK(upobj);
for (i = 0; i < UAREA_PAGES; i++) {
m = vm_page_grab(upobj, i,
m = vm_page_grab(upobj, i, VM_ALLOC_NOBUSY |
VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
vm_page_lock_queues();
vm_page_wakeup(m);
m->valid = VM_PAGE_BITS_ALL;
vm_page_unlock_queues();
}
VM_OBJECT_UNLOCK(upobj);
@ -470,13 +466,10 @@ vm_thread_new(struct thread *td, int pages)
/*
* Get a kernel stack page.
*/
m = vm_page_grab(ksobj, i,
m = vm_page_grab(ksobj, i, VM_ALLOC_NOBUSY |
VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
vm_page_lock_queues();
vm_page_wakeup(m);
m->valid = VM_PAGE_BITS_ALL;
vm_page_unlock_queues();
}
VM_OBJECT_UNLOCK(ksobj);
pmap_qenter(ks, ma, pages);

View File

@ -173,11 +173,10 @@ kmem_alloc(map, size)
vm_page_t mem;
mem = vm_page_grab(kernel_object, OFF_TO_IDX(offset + i),
VM_ALLOC_ZERO | VM_ALLOC_RETRY);
VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
mem->valid = VM_PAGE_BITS_ALL;
vm_page_lock_queues();
vm_page_unmanage(mem);
vm_page_wakeup(mem);
vm_page_unlock_queues();
}
VM_OBJECT_UNLOCK(kernel_object);