Date: Thu, 11 Aug 2016 09:30:26 +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-11@freebsd.org Subject: svn commit: r303954 - stable/11/sys/amd64/amd64 Message-ID: <201608110930.u7B9UQWw017569@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Aug 11 09:30:25 2016 New Revision: 303954 URL: https://svnweb.freebsd.org/changeset/base/303954 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. Approved by: re (gjb) Modified: stable/11/sys/amd64/amd64/support.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/support.S ============================================================================== --- stable/11/sys/amd64/amd64/support.S Thu Aug 11 09:28:49 2016 (r303953) +++ stable/11/sys/amd64/amd64/support.S Thu Aug 11 09:30:25 2016 (r303954) @@ -64,17 +64,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?201608110930.u7B9UQWw017569>