summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-07-17 03:10:17 +0000
committeralc <alc@FreeBSD.org>2006-07-17 03:10:17 +0000
commit45cb17842617c19d39fe2baf45757f37d2698f9c (patch)
tree00840745b38dcee1d32627da65915d8af9f5ebd1 /sys/amd64
parentf457417c4c3c641d7c6e1fa68923519c02a7078e (diff)
downloadFreeBSD-src-45cb17842617c19d39fe2baf45757f37d2698f9c.zip
FreeBSD-src-45cb17842617c19d39fe2baf45757f37d2698f9c.tar.gz
Now that free_pv_entry() accesses the pmap, call free_pv_entry() in
pmap_remove_all() before rather than after the pmap is unlocked. At present, the page queues lock provides sufficient sychronization. In the future, the page queues lock may not always be held when free_pv_entry() is called.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index c5368db..ed96ba7 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1627,6 +1627,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv)
int idx, field, bit;
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+ PMAP_LOCK_ASSERT(pmap, MA_OWNED);
PV_STAT(pv_entry_frees++);
PV_STAT(pv_entry_spare++);
pv_entry_count--;
@@ -2015,8 +2016,8 @@ pmap_remove_all(vm_page_t m)
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count--;
pmap_unuse_pt(pmap, pv->pv_va, ptepde);
- PMAP_UNLOCK(pmap);
free_pv_entry(pmap, pv);
+ PMAP_UNLOCK(pmap);
}
vm_page_flag_clear(m, PG_WRITEABLE);
}
OpenPOWER on IntegriCloud