svn commit: r212363 - head/sys/powerpc/aim
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Sep 9 16:06:56 UTC 2010
Author: nwhitehorn
Date: Thu Sep 9 16:06:55 2010
New Revision: 212363
URL: http://svn.freebsd.org/changeset/base/212363
Log:
Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.
Modified:
head/sys/powerpc/aim/mmu_oea64.c
Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c Thu Sep 9 15:45:11 2010 (r212362)
+++ head/sys/powerpc/aim/mmu_oea64.c Thu Sep 9 16:06:55 2010 (r212363)
@@ -2424,7 +2424,6 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z
* 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 z
*/
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 *
More information about the svn-src-all
mailing list