Home | History | Annotate | Download | only in include
History log of /src/sys/arch/hp300/include/vmparam.h
RevisionDateAuthorComments
 1.41  01-Feb-2020  tsutsui Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
 1.40  28-Jun-2019  tsutsui branches: 1.40.2; 1.40.4;
Fix lingering page size comments.

Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?
 1.39  02-Feb-2017  rin branches: 1.39.14;
PR port-mac68k/51923
Bump default MAXTSIZ to 32MB for m68k ports, which allos us to use GCC 5.4 on
GENERIC kernels.
Ok jklos
 1.38  02-Feb-2017  rin PR port-mac68k/51923
Remove unused SYSPTSIZE and USRPTSIZE from m68k ports.
Ok jklos
 1.37  08-Feb-2011  rmind branches: 1.37.14; 1.37.32; 1.37.36; 1.37.40;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.36  06-Nov-2010  uebayasi branches: 1.36.2; 1.36.4;
Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)). This functionality will be re-added later.
 1.35  08-Dec-2009  tsutsui branches: 1.35.2; 1.35.4;
Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
 1.34  26-Aug-2009  thorpej Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
 1.33  06-Mar-2009  joerg Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.32  11-Dec-2005  christos branches: 1.32.78; 1.32.86; 1.32.92;
merge ktrace-lwp.
 1.31  01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.30  07-Aug-2003  agc branches: 1.30.8; 1.30.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.29  02-Apr-2003  thorpej branches: 1.29.2;
Use PAGE_SIZE rather than NBPG.
 1.28  10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.27  15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.26  01-May-2001  thorpej branches: 1.26.2; 1.26.8;
Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.25  29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.24  12-Dec-2000  simonb branches: 1.24.2;
Bump the initial data size limit to 32MB - large enough to compile a
kernel with an ELF toolchain.
 1.23  01-Dec-2000  tsutsui Remove unused pcbb() macro.
 1.22  14-Nov-2000  thorpej We use 4K pages on the hp300. Make PAGE_SIZE and friends
compile-time constants.
 1.21  11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.20  26-Jan-2000  tsutsui Remove obsoleted macros.
 1.19  04-Dec-1999  ragge CL* discarding.
 1.18  26-Apr-1999  thorpej branches: 1.18.2; 1.18.8;
Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
 1.17  16-Jan-1999  chuck branches: 1.17.4;
MNN is now the default
 1.16  20-Aug-1998  kleink vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t
 1.15  08-Jul-1998  thorpej Define one page free list, and put all pages on it.
 1.14  26-Apr-1998  scottr GC the old MACHINE_NONCONTIG code.
 1.13  08-Feb-1998  thorpej Implement MACHINE_NEW_NONCONTIG and switch the hp300 port to use it.
 1.12  12-Jul-1997  perry update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson
 1.11  12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.10  15-Mar-1997  thorpej branches: 1.10.2;
User text segment begins at 8k, now, to match the other m68k ports.
 1.9  20-Oct-1996  thorpej branches: 1.9.4;
Back out last change, and add a comment about what should happen.
(*grumble* will teach me to do a `make clean' next time.)
 1.8  19-Oct-1996  thorpej Set VM_MIN_KERNEL_ADDRESS to NBPG. This is a better way of getting
the kernel_map to treat page 0 properly.
 1.7  26-Oct-1994  cgd new RCS ID format.
 1.6  23-May-1994  mycroft Merge with 4.4-Lite.
 1.5  24-Aug-1993  mycroft Double data size limits to make GCC happier.
 1.4  19-Aug-1993  mycroft Set USRTEXT to NBPG.
 1.3  01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.2  22-May-1993  cgd add rcsids to everything and clean up headers
 1.1  13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.9.4.1  12-Feb-1997  mrg initial work for dynamic swap additions.
 1.10.2.1  04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.17.4.2  06-Aug-1999  chs take an initial guess at UBC parameters.
 1.17.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.18.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.5  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.18.2.4  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes)
 1.18.2.3  08-Dec-2000  bouyer Sync with HEAD.
 1.18.2.2  22-Nov-2000  bouyer Sync with HEAD.
 1.18.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.24.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.26.8.3  11-Dec-2002  thorpej Sync with HEAD.
 1.26.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.26.8.1  01-May-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:24:45 +0000
 1.26.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.29.2.4  01-Apr-2005  skrll Sync with HEAD.
 1.29.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.29.2.1  03-Aug-2004  skrll Sync with HEAD
 1.30.10.1  24-Feb-2005  yamt change kernel va layout, following mac68k.
 1.30.8.1  29-Apr-2005  kent sync with -current
 1.32.92.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.32.86.1  28-Apr-2009  skrll Sync with HEAD.
 1.32.78.3  11-Mar-2010  yamt sync with head
 1.32.78.2  16-Sep-2009  yamt sync with head
 1.32.78.1  04-May-2009  yamt sync with head.
 1.35.4.1  05-Mar-2011  rmind sync with head
 1.35.2.1  26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.36.4.1  17-Feb-2011  bouyer Sync with HEAD
 1.36.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.37.40.1  21-Apr-2017  bouyer Sync with HEAD
 1.37.36.1  20-Mar-2017  pgoyette Sync with HEAD
 1.37.32.1  05-Feb-2017  skrll Sync with HEAD
 1.37.14.1  03-Dec-2017  jdolecek update from HEAD
 1.39.14.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.40.4.1  29-Feb-2020  ad Sync with head.
 1.40.2.1  10-Feb-2020  martin Pull up following revision(s) (requested by tsutsui in ticket #682):

sys/arch/next68k/include/vmparam.h: revision 1.27
sys/arch/mac68k/include/vmparam.h: revision 1.46
sys/arch/sun3/include/vmparam.h: revision 1.38
sys/arch/m68k/include/vmparam.h: revision 1.1
sys/arch/hp300/include/vmparam.h: revision 1.41
sys/arch/m68k/include/Makefile: revision 1.32
sys/arch/amiga/include/vmparam.h: revision 1.48
distrib/sets/lists/comp/ad.m68k: revision 1.63
sys/arch/x68k/include/vmparam.h: revision 1.40
sys/arch/mvme68k/include/vmparam.h: revision 1.38
sys/arch/luna68k/include/vmparam.h: revision 1.23
sys/arch/news68k/include/vmparam.h: revision 1.23
sys/arch/atari/include/vmparam.h: revision 1.34
sys/arch/cesfic/include/vmparam.h: revision 1.19

Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).

Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
but each port uses different PAGE_SIZE value (4096 or 8192)
due to historical reasons.
- Currently module(7) binaries are built per each port so
all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
support m68k ports where PAGE_SIZE==8192.
(though this would affect only if static binaries built on
4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.

For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.

RSS XML Feed