summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-05-30 20:31:12 +0000
committeralc <alc@FreeBSD.org>2010-05-30 20:31:12 +0000
commit5c8460ba2e20852ad03e95edc6ed72e57382adb1 (patch)
treecf4214ec07268cb8726761867863445a79283447 /sys/sun4v
parent0227397f4ac8049aaffc32139b100d54c3ab8dc6 (diff)
downloadFreeBSD-src-5c8460ba2e20852ad03e95edc6ed72e57382adb1.zip
FreeBSD-src-5c8460ba2e20852ad03e95edc6ed72e57382adb1.tar.gz
Simplify the inner loop of get_pv_entry(): While iterating over the page's
pv list, there is no point in checking whether or not the pv list is empty, wait instead until the loop completes.
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/sun4v/pmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c
index 9a7949c..8044048 100644
--- a/sys/sun4v/sun4v/pmap.c
+++ b/sys/sun4v/sun4v/pmap.c
@@ -341,8 +341,6 @@ retry:
pmap_invalidate_page(pmap, va, TRUE);
TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist);
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
- if (TAILQ_EMPTY(&m->md.pv_list))
- vm_page_flag_clear(m, PG_WRITEABLE);
m->md.pv_list_count--;
if (pmap != locked_pmap)
@@ -352,6 +350,8 @@ retry:
else
free_pv_entry(pv);
}
+ if (TAILQ_EMPTY(&m->md.pv_list))
+ vm_page_flag_clear(m, PG_WRITEABLE);
}
if (allocated_pv == NULL) {
if (vpq == &vm_page_queues[PQ_INACTIVE]) {
OpenPOWER on IntegriCloud