summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-03 04:00:42 +0000
committeralc <alc@FreeBSD.org>2002-12-03 04:00:42 +0000
commit1195f220807e870090d0e221c3457ebac2301692 (patch)
tree0817e774128a35a2c0d028836809e83b2d828dc8
parente70e70c250359ed2e7072c2b89a82cb0ec9780b0 (diff)
downloadFreeBSD-src-1195f220807e870090d0e221c3457ebac2301692.zip
FreeBSD-src-1195f220807e870090d0e221c3457ebac2301692.tar.gz
Avoid recursive acquisition of the page queues lock in pmap_unuse_pt().
Approved by: re
-rw-r--r--sys/amd64/amd64/pmap.c4
-rw-r--r--sys/i386/i386/pmap.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index c842eff..8ee5886 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1213,7 +1213,9 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t mpte)
(pmap->pm_ptphint->pindex == ptepindex)) {
mpte = pmap->pm_ptphint;
} else {
- mpte = pmap_page_lookup(pmap->pm_pteobj, ptepindex);
+ while ((mpte = vm_page_lookup(pmap->pm_pteobj, ptepindex)) != NULL &&
+ vm_page_sleep_if_busy(mpte, FALSE, "pulook"))
+ vm_page_lock_queues();
pmap->pm_ptphint = mpte;
}
}
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index c842eff..8ee5886 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1213,7 +1213,9 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t mpte)
(pmap->pm_ptphint->pindex == ptepindex)) {
mpte = pmap->pm_ptphint;
} else {
- mpte = pmap_page_lookup(pmap->pm_pteobj, ptepindex);
+ while ((mpte = vm_page_lookup(pmap->pm_pteobj, ptepindex)) != NULL &&
+ vm_page_sleep_if_busy(mpte, FALSE, "pulook"))
+ vm_page_lock_queues();
pmap->pm_ptphint = mpte;
}
}
OpenPOWER on IntegriCloud