Subject: CVS commit: syssrc/sys/arch/sparc64
To: None <source-changes@netbsd.org>
From: Chuck Silvers <chs@netbsd.org>
List: source-changes
Date: 09/22/2002 10:19:55
Module Name: syssrc
Committed By: chs
Date: Sun Sep 22 07:19:54 UTC 2002
Modified Files:
syssrc/sys/arch/sparc64/dev: iommu.c
syssrc/sys/arch/sparc64/include: pmap.h pte.h vmparam.h
syssrc/sys/arch/sparc64/sparc64: cache.h cpu.c locore.s machdep.c mem.c
pmap.c trap.c vm_machdep.c
Log Message:
many improvements:
- use struct vm_page_md for attaching pv entries to struct vm_page
- change pseg_set()'s return value to indicate whether the spare page
was used as an L2 or L3 PTP.
- use a pool for pv entries instead of malloc().
- put PTPs on a list attached to the pmap so we can free them
more efficiently (by just walking the list) in pmap_destroy().
- use the new pmap_remove_all() interface to avoid flushing the cache and TLB
for each pmap_remove() that's done as we are tearing down an address space.
- in pmap_enter(), handle replacing an existing mapping more efficiently
than just calling pmap_remove() on it. also, skip flushing the
TSB and TLB if there was no previous mapping, since there can't be
anything we need to flush. also, preload the TSB if we're pre-setting
the mod/ref bits.
- allocate hardware contexts like the MIPS pmap:
allocate them all sequentially without reuse, then once we run out
just invalidate all user TLB entries and flush the entire L1 dcache.
- fix pmap_extract() for the case where the va is not page-aligned and
nothing is mapped there.
- fix calculation of TSB size. it was comparing physmem (which is
in units of pages) to constants that only make sense if they are
in units of bytes.
- avoid sleeping in pmap_enter(), instead let the caller do it.
- use pmap_kenter_pa() instead of pmap_enter() where appropriate.
- remove code to handle impossible cases in various functions.
- tweak asm code to pipeline a little better.
- remove many unnecessary spls and membars.
- lots of code cleanup.
- no doubt other stuff that I've forgotten.
the result of all this is that a fork+exit microbenchmark is 34% faster
and a fork+exec+exit microbenchmark is 28% faster.
To generate a diff of this commit:
cvs rdiff -r1.57 -r1.58 syssrc/sys/arch/sparc64/dev/iommu.c
cvs rdiff -r1.22 -r1.23 syssrc/sys/arch/sparc64/include/pmap.h
cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/sparc64/include/pte.h
cvs rdiff -r1.20 -r1.21 syssrc/sys/arch/sparc64/include/vmparam.h
cvs rdiff -r1.4 -r1.5 syssrc/sys/arch/sparc64/sparc64/cache.h
cvs rdiff -r1.19 -r1.20 syssrc/sys/arch/sparc64/sparc64/cpu.c
cvs rdiff -r1.158 -r1.159 syssrc/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -r1.126 -r1.127 syssrc/sys/arch/sparc64/sparc64/machdep.c \
syssrc/sys/arch/sparc64/sparc64/pmap.c
cvs rdiff -r1.21 -r1.22 syssrc/sys/arch/sparc64/sparc64/mem.c
cvs rdiff -r1.82 -r1.83 syssrc/sys/arch/sparc64/sparc64/trap.c
cvs rdiff -r1.44 -r1.45 syssrc/sys/arch/sparc64/sparc64/vm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.