From 069c6b026d72a164c5534e8844293d6048132198 Mon Sep 17 00:00:00 2001 From: Kurt Lidl Date: Tue, 3 Mar 2015 00:22:49 -0500 Subject: [PATCH 1/1] Unroll the loop for zeroing pages to be a full cache line Gives a consistant 1% decrease in system time when running "buildworld" or "buildkernel". --- sys/amd64/amd64/support.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index f8b75ff..04aea18 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -73,7 +73,11 @@ ENTRY(pagezero) movnti %rax,8(%rdi,%rdx) movnti %rax,16(%rdi,%rdx) movnti %rax,24(%rdi,%rdx) - addq $32,%rdx + movnti %rax,32(%rdi,%rdx) + movnti %rax,40(%rdi,%rdx) + movnti %rax,48(%rdi,%rdx) + movnti %rax,56(%rdi,%rdx) + addq $64,%rdx jne 1b sfence POP_FRAME_POINTER -- 2.3.4