Date: Wed, 30 Dec 2015 02:26:04 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292901 - head/sys/powerpc/booke Message-ID: <201512300226.tBU2Q473079804@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Wed Dec 30 02:26:04 2015 New Revision: 292901 URL: https://svnweb.freebsd.org/changeset/base/292901 Log: Optimize zero_page for book-e mmu. Instead of indirectly calling bzero() through mmu_booke_zero_page_area, zero the full page the same way as the AIM pmap logic does: using dcbz. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Wed Dec 30 02:23:14 2015 (r292900) +++ head/sys/powerpc/booke/pmap.c Wed Dec 30 02:26:04 2015 (r292901) @@ -2235,8 +2235,17 @@ mmu_booke_zero_page_area(mmu_t mmu, vm_p static void mmu_booke_zero_page(mmu_t mmu, vm_page_t m) { + vm_offset_t off, va; - mmu_booke_zero_page_area(mmu, m, 0, PAGE_SIZE); + mtx_lock(&zero_page_mutex); + va = zero_page_va; + + mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m)); + for (off = 0; off < PAGE_SIZE; off += cacheline_size) + __asm __volatile("dcbzl 0,%0" :: "r"(va + off)); + mmu_booke_kremove(mmu, va); + + mtx_unlock(&zero_page_mutex); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512300226.tBU2Q473079804>