summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-04-29 00:59:15 +0000
committeralc <alc@FreeBSD.org>2006-04-29 00:59:15 +0000
commit0b53c91566dc14f4d481c6cdb25b0cf9101482d1 (patch)
tree8fe797d6dca810e87c63e24acca285c51e126748 /sys
parent717d157010b33f39734430a1fa87746d6f6f4d04 (diff)
downloadFreeBSD-src-0b53c91566dc14f4d481c6cdb25b0cf9101482d1.zip
FreeBSD-src-0b53c91566dc14f4d481c6cdb25b0cf9101482d1.tar.gz
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().
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/pmap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index da7d300..fd5e21d 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -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();
}
/*
OpenPOWER on IntegriCloud