CVS commit: src/sys/arch

"Jason R Thorpe" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	thorpej
Date:		Thu Apr 30 14:10:04 UTC 2026

Modified Files:
	src/sys/arch/amiga/include: vmparam.h
	src/sys/arch/atari/include: vmparam.h
	src/sys/arch/cesfic/include: vmparam.h
	src/sys/arch/hp300/include: vmparam.h
	src/sys/arch/luna68k/include: vmparam.h
	src/sys/arch/m68k/include: vmparam.h
	src/sys/arch/m68k/m68k: vm_machdep.c
	src/sys/arch/mac68k/include: vmparam.h
	src/sys/arch/mvme68k/include: vmparam.h
	src/sys/arch/news68k/include: vmparam.h
	src/sys/arch/next68k/include: vmparam.h
	src/sys/arch/sun2/include: vmparam.h
	src/sys/arch/sun3/include: vmparam.h
	src/sys/arch/virt68k/include: vmparam.h
	src/sys/arch/x68k/include: vmparam.h

Log Message:
Centralize the definition of VM_PHYS_SIZE.  While doing so, change
the logic for its value, eliminating the obsolete USRIOSIZE constant.

Previously, on Utah-derived platforms, USRIOSIZE was defined as the
number of PTEs used for phys_map, and VM_PHYS_SIZE was USRIOSIZE * PAGE_SIZE.
The USRIOSIZE was in turn derived from NPTEPG (number of PTEs in one page).

On 4K page systems, that was a 4MB phys_map.  On 8K page systems, that
was a 16MB phys_map (4x muliplier comes from 2x PTEs per page, 2x bytes
per page mapped).  These values are totally excessive; the most pressure
phys_map experiences on a typical system is boot-time fsck, and the max
mapping request it will see is MAXPHYS (64KB); it is generally not used in
steady-state operation.  In contrast, alpha's phys_map is 512KB and 32-bit
x86 is ~1MB.

Instead, simply define reasonable values for VM_PHYS_SIZE independent of
PAGE_SIZE: 256KB for 68010, 1MB for everone else.  Per-platform constraints
can override these values (although they happen to match what Sun2 and Sun3
use, respectively).

A compile-time assertion is used to ensure that at least 2 concurrent
physios fit into phys_map.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amiga/include/vmparam.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/atari/include/vmparam.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/cesfic/include/vmparam.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/hp300/include/vmparam.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/include/vmparam.h
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/m68k/m68k/vm_machdep.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mac68k/include/vmparam.h
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mvme68k/include/vmparam.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/news68k/include/vmparam.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/next68k/include/vmparam.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sun2/include/vmparam.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sun3/include/vmparam.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/virt68k/include/vmparam.h
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x68k/include/vmparam.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.