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)
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to