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.
This commit is contained in:
Nathan Whitehorn 2010-12-28 17:02:15 +00:00
parent e58ed10207
commit 52a190480f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216765

View File

@ -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