1a5735873e
for zeroing pages in idle where nontemporal writes are clearly best. This is almost a no-op since zeroing in idle works does nothing good and is off by default. Fix END() statement forgotten in previous commit. Align the loop in sse2_pagezero(). Since it writes to main memory, the loop doesn't have to be very carefully written to keep up. Unrolling it was considered useless or harmful and was not done on i386, but that was too careless. Timing for i386: the loop was not unrolled at all, and moved only 4 bytes/iteration. So on a 2GHz CPU, it needed to run at 2 cycles/ iteration to keep up with a memory speed of just 4GB/sec. But when it crossed a 16-byte boundary, on old CPUs it ran at 3 cycles/ iteration so it gave a maximum speed of 2.67GB/sec and couldn't even keep up with PC3200 memory. Fix the alignment so that it keep up with 4GB/sec memory, and unroll once to get nearer to 8GB/sec. Further unrolling might be useless or harmful since it would prevent the loop fitting in 16-bytes. My test system with an old CPU and old DDR1 only needed 5+ GB/sec. My test system with a new CPU and DDR3 doesn't need any changes to keep up ~16GB/sec. Timing for amd64: with 8-byte accesses and newer faster CPUs it is easy to reach 16GB/sec but not so easy to go much faster. The alignment doesn't matter much if the CPU is not very old. The loop was already unrolled 4 times, but needs 32 bytes and uses a fancy method that doesn't work for 2-way unrolling in 16 bytes. Just align it to 32-bytes. |
||
---|---|---|
.. | ||
pc | ||
xen | ||
_align.h | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
acpica_machdep.h | ||
apm_bios.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bus_dma.h | ||
bus.h | ||
clock.h | ||
counter.h | ||
cpu.h | ||
cpufunc.h | ||
cputypes.h | ||
db_machdep.h | ||
dump.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
fdt.h | ||
float.h | ||
floatingpoint.h | ||
fpu.h | ||
frame.h | ||
gdb_machdep.h | ||
ieeefp.h | ||
in_cksum.h | ||
intr_machdep.h | ||
iodev.h | ||
kdb.h | ||
limits.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
minidump.h | ||
mp_watchdog.h | ||
nexusvar.h | ||
npx.h | ||
ofw_machdep.h | ||
param.h | ||
pcb.h | ||
pci_cfgreg.h | ||
pcpu.h | ||
pmap.h | ||
pmc_mdep.h | ||
ppireg.h | ||
proc.h | ||
profile.h | ||
psl.h | ||
ptrace.h | ||
pvclock.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
segments.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
specialreg.h | ||
stack.h | ||
stdarg.h | ||
sysarch.h | ||
timerreg.h | ||
trap.h | ||
tss.h | ||
ucontext.h | ||
varargs.h | ||
vdso.h | ||
vm.h | ||
vmm_dev.h | ||
vmm_instruction_emul.h | ||
vmm.h | ||
vmparam.h |