Folks --
With the help of John Klos, who kindly provided access to a DS25 system for debugging and testing, I've made several improvements to the NetBSD/alpha pmap that should significantly improve stability when running with the MULTIPROCESSOR option. There were some significant bugs lurking in there vis a vis MP-safe TLB management, and there were lots of things that could be optimized.
So far in the testing I've done, this is quite a bit more stable than the previous code, and the stats I've been collecting show that the optimizations are being effective and that some deadlocks that existed previously are being avoided.
I'm going to beat on it some more before declaring complete victory, but I would encourage folks who were having problems with the GENERIC.MP kernel before to update their sources, build a new MP kernel, and give these changes some more air time.
Thx. Begin forwarded message:
Subject: CVS commit: src/sys/arch/alpha
Date: August 29, 2020 at 1:07:00 PM PDT
Module Name: src Committed By: thorpej Date: Sat Aug 29 20:07:00 UTC 2020
Modified Files: src/sys/arch/alpha/alpha: cpu.c ipifuncs.c pmap.c vm_machdep.c src/sys/arch/alpha/include: cpu.h intr.h pmap.h
Log Message: - Centralize per-CPU pmap initialization into a new pmap_init_cpu() function. Call in from pmap_bootstrap() for the boot CPU, and from cpu_hatch() for secondaary CPUs. - Eliminiate the dedicated I-stream memory barrier IPI; handle it all from the TLB shootdown IPI. Const poison, and add some additional memory barriers and a TBIA to the PAUSE IPI. - Completly rewrite TLB management in the alpha pmap module, borrowing somoe ideas from the x86 pmap and adapting them to the alpha environment. See the comments for theory of operation. Add a bunch of stats that can be reported (disabled by default). - Add some additional symbol decorations to improve cache behavior on MP systems. Ensure coherency unit alignment for several structures in the pmap module. Use hashed locks for pmap structures. - Start out all new processes on the kernel page tables until their first trip though pmap_activate() to avoid the potential of polluting the current ASN in TLB with cross-process mappings.
To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/alpha/alpha/cpu.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/alpha/alpha/ipifuncs.c cvs rdiff -u -r1.268 -r1.269 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.115 -r1.116 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.88 -r1.89 src/sys/arch/alpha/include/cpu.h cvs rdiff -u -r1.72 -r1.73 src/sys/arch/alpha/include/intr.h cvs rdiff -u -r1.82 -r1.83 src/sys/arch/alpha/include/pmap.h
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
|