Pass VM_ALLOC_NOBUSY to vm_page_grab() so that we don't have to call
vm_page_flag_clear(PG_BUSY). The object lock is held the entire time. Thus, whether or not the PG_BUSY flag is set is invisible to others.
This commit is contained in:
parent
1ab58cc2df
commit
5031dd39f0
@ -1022,11 +1022,10 @@ pmap_pinit(pmap_t pm)
|
||||
|
||||
VM_OBJECT_LOCK(pm->pm_tsb_obj);
|
||||
for (i = 0; i < TSB_PAGES; i++) {
|
||||
m = vm_page_grab(pm->pm_tsb_obj, i,
|
||||
m = vm_page_grab(pm->pm_tsb_obj, i, VM_ALLOC_NOBUSY |
|
||||
VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO);
|
||||
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user