Eliminate unnecessary, recursive acquisitions and releases of the page

queues lock by free_pv_entry() and pmap_remove_pages().

Reduce the scope of the page queues lock in pmap_remove_pages().
This commit is contained in:
Alan Cox 2006-04-29 00:59:15 +00:00
parent b1cc10206c
commit e9ba21a5bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158133

View File

@ -1546,6 +1546,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv)
struct pv_chunk *pc;
int idx, field, bit;
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
PV_STAT(pv_entry_frees++);
PV_STAT(pv_entry_spare++);
pv_entry_count--;
@ -1567,9 +1568,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv)
TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc));
dump_drop_page(m->phys_addr);
vm_page_lock_queues();
vm_page_free(m);
vm_page_unlock_queues();
}
/*
@ -2802,14 +2801,12 @@ pmap_remove_pages(pmap_t pmap)
TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc));
dump_drop_page(m->phys_addr);
vm_page_lock_queues();
vm_page_free(m);
vm_page_unlock_queues();
}
}
vm_page_unlock_queues();
pmap_invalidate_all(pmap);
PMAP_UNLOCK(pmap);
vm_page_unlock_queues();
}
/*