diff options
author | mjg <mjg@FreeBSD.org> | 2016-08-11 09:30:25 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2016-08-11 09:30:25 +0000 |
commit | 81d25dd54fcac16c33b36e2ebe8e82c2a70c5986 (patch) | |
tree | 60a99d20322e91de6254a84ff3efd56e9e6e368a /sys | |
parent | f6eab3bb444ed8b47aa811577447abfcd80c5a8b (diff) | |
download | FreeBSD-src-81d25dd54fcac16c33b36e2ebe8e82c2a70c5986.zip FreeBSD-src-81d25dd54fcac16c33b36e2ebe8e82c2a70c5986.tar.gz |
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)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/support.S | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index dc94891..e7af5d7 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -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) |