diff options
author | alc <alc@FreeBSD.org> | 2006-07-06 06:17:08 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2006-07-06 06:17:08 +0000 |
commit | 3841b0dbab7e9af947147179e5a2ae6ae19f0296 (patch) | |
tree | 08c764e9439d7487bd524ea0a61476969a3986d7 /sys/amd64 | |
parent | 6cf0e874f459a2739d9c59ec7b35f62d8121b9b5 (diff) | |
download | FreeBSD-src-3841b0dbab7e9af947147179e5a2ae6ae19f0296.zip FreeBSD-src-3841b0dbab7e9af947147179e5a2ae6ae19f0296.tar.gz |
Make two simplifications to pmap_ts_referenced(): Eliminate an unnecessary
test and exit the loop in a shorter way.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 31859de..c5368db 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3050,14 +3050,12 @@ pmap_ts_referenced(vm_page_t m) pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); - if (pte != NULL && (*pte & PG_A) != 0) { + if ((*pte & PG_A) != 0) { atomic_clear_long(pte, PG_A); pmap_invalidate_page(pmap, pv->pv_va); rtval++; - if (rtval > 4) { - PMAP_UNLOCK(pmap); - break; - } + if (rtval > 4) + pvn = NULL; } PMAP_UNLOCK(pmap); } while ((pv = pvn) != NULL && pv != pvf); |