Date: Tue, 28 Dec 2010 17:02:15 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r216765 - head/sys/powerpc/aim Message-ID: <201012281702.oBSH2F6l067872@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Tue Dec 28 17:02:15 2010 New Revision: 216765 URL: http://svn.freebsd.org/changeset/base/216765 Log: 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. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Tue Dec 28 16:57:29 2010 (r216764) +++ head/sys/powerpc/aim/moea64_native.c Tue Dec 28 17:02:15 2010 (r216765) @@ -281,7 +281,10 @@ moea64_pte_set_native(struct lpte *pt, s 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, uintp * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012281702.oBSH2F6l067872>