Date: Sat, 31 Dec 2016 13:23:28 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310975 - stable/10/sys/amd64/amd64 Message-ID: <201612311323.uBVDNSD2000879@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Sat Dec 31 13:23:28 2016 New Revision: 310975 URL: https://svnweb.freebsd.org/changeset/base/310975 Log: MFC r303583: amd64: implement pagezero using rep stos The current implementation uses non-temporal writes. This turns out to be detrimental to performance if the page is used shortly after, which is the typical case with page faults. Switch to rep stos. Modified: stable/10/sys/amd64/amd64/support.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/support.S ============================================================================== --- stable/10/sys/amd64/amd64/support.S Sat Dec 31 13:15:52 2016 (r310974) +++ stable/10/sys/amd64/amd64/support.S Sat Dec 31 13:23:28 2016 (r310975) @@ -65,17 +65,10 @@ END(bzero) /* Address: %rdi */ ENTRY(pagezero) PUSH_FRAME_POINTER - movq $-PAGE_SIZE,%rdx - subq %rdx,%rdi + movq $PAGE_SIZE/8,%rcx xorl %eax,%eax -1: - movnti %rax,(%rdi,%rdx) - movnti %rax,8(%rdi,%rdx) - movnti %rax,16(%rdi,%rdx) - movnti %rax,24(%rdi,%rdx) - addq $32,%rdx - jne 1b - sfence + rep + stosq POP_FRAME_POINTER ret END(pagezero)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612311323.uBVDNSD2000879>