summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/mmu_oea64.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-09-09 16:06:55 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-09-09 16:06:55 +0000
commita03821b38825e913b3542c747196ea1595e42810 (patch)
tree9f812789302e5be6dc8ecc36bb89e65e5e3301f7 /sys/powerpc/aim/mmu_oea64.c
parent3a255aa391bd4b025a56a2adf21d4b51c4e309ea (diff)
downloadFreeBSD-src-a03821b38825e913b3542c747196ea1595e42810.zip
FreeBSD-src-a03821b38825e913b3542c747196ea1595e42810.tar.gz
Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.
Diffstat (limited to 'sys/powerpc/aim/mmu_oea64.c')
-rw-r--r--sys/powerpc/aim/mmu_oea64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index a6aebde..dc055a3 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -2424,7 +2424,6 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t zone, struct pvo_head *pvo_head,
* the bootstrap pool.
*/
- moea64_pvo_enter_calls++;
first = 0;
bootstrap = (flags & PVO_BOOTSTRAP);
@@ -2444,6 +2443,8 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t zone, struct pvo_head *pvo_head,
*/
LOCK_TABLE();
+ moea64_pvo_enter_calls++;
+
LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) {
if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) {
if ((pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) == pa &&
@@ -2608,14 +2609,15 @@ moea64_pvo_remove(struct pvo_entry *pvo)
* if we aren't going to reuse it.
*/
LIST_REMOVE(pvo, pvo_olink);
+
+ moea64_pvo_entries--;
+ moea64_pvo_remove_calls++;
+
UNLOCK_TABLE();
if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP))
uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone :
moea64_upvo_zone, pvo);
-
- moea64_pvo_entries--;
- moea64_pvo_remove_calls++;
}
static struct pvo_entry *
OpenPOWER on IntegriCloud