summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-12-28 17:02:15 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-12-28 17:02:15 +0000
commitdf478abcd28908efb5863685875146b9f7fffd64 (patch)
treecf1968e84b56b33afb0ff36392e73ff600f7e204 /sys
parent936f38f35c397853e5587ee3f6c8e719d90847d0 (diff)
downloadFreeBSD-src-df478abcd28908efb5863685875146b9f7fffd64.zip
FreeBSD-src-df478abcd28908efb5863685875146b9f7fffd64.tar.gz
Only keep track of PTE validity statistics for pages not locked in the
table. The 'locked' attribute is used to circumvent the regular page table locking for some special pages, with the result that including locked pages here causes races when updating the stats.
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/aim/moea64_native.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/powerpc/aim/moea64_native.c b/sys/powerpc/aim/moea64_native.c
index 1869836..bca51ab 100644
--- a/sys/powerpc/aim/moea64_native.c
+++ b/sys/powerpc/aim/moea64_native.c
@@ -281,7 +281,10 @@ moea64_pte_set_native(struct lpte *pt, struct lpte *pvo_pt)
EIEIO();
pt->pte_hi = pvo_pt->pte_hi;
PTESYNC();
- moea64_pte_valid++;
+
+ /* Keep statistics for unlocked pages */
+ if (!(pvo_pt->pte_hi & LPTE_LOCKED))
+ moea64_pte_valid++;
}
static void
@@ -310,7 +313,10 @@ moea64_pte_unset_native(mmu_t mmu, uintptr_t pt_cookie, struct lpte *pvo_pt,
* Save the reg & chg bits.
*/
moea64_pte_synch_native(mmu, pt_cookie, pvo_pt);
- moea64_pte_valid--;
+
+ /* Keep statistics for unlocked pages */
+ if (!(pvo_pt->pte_hi & LPTE_LOCKED))
+ moea64_pte_valid--;
}
static void
OpenPOWER on IntegriCloud