History log of /netbsd-current/sys/conf/param.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.70 23-Jul-2022 mrg

make MAXLWP a real option that triggers rebuilds properly.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.69 12-Nov-2020 simonb

Set a better default for MAXFILES on larger RAM machines if not
otherwise specified the kernel config file. Arbitary numbers are
20,000 files for 16GB RAM or more and 10,000 files for 1GB RAM or
more.

TODO: Adjust this and other values totally dynamically.


Revision tags: netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.68 09-Apr-2019 pgoyette

branches: 1.68.4; 1.68.12;
defparam all of the config variables associated with SYSV IPC stuff.
The variables were removed from sys/conf/param.c and moved into the
SYSV IPC code, but config options were never propagated via any opt_*
file.

This should fix an issue reported on netbsd-users list from Dima Veselov.

Note that this does not address other parameters included in that report,
including CHILD_MAX and NOFILE; this commit only affects items related to
the SYSV IPC code. Also note that this does not affect non-built-in
sysv_ipc modules, for which you need to update the Makefile to use any
non-standard config values - just like any other non-built-in modules
which have config params.

XXX Pull-up to -8 and -8-0

XXX Note that there are a couple of panic() calls in msginit() which
XXX really should be changed to simple printf() and then result in
XXX msginit failure. Unfortunately msginit() currently doesn't return
XXX a value so we cannot indicate failure to the caller. I will fix
XXX this is a future commit.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.67 09-Nov-2015 pgoyette

branches: 1.67.10; 1.67.18;
Whether or not the semaphore code is loaded as a module or built-in, its
sysctl data belongs with the module code. Move it from kern/init_sysctl.c
to kern/uipc_sem.c

While here, add a new sysctl variable kern.posix.semcnt (current count of
semaphores) to complement the existing kern.posix.semmax (maximum number
of semaphores).


Revision tags: nick-nhusb-base-20150921
# 1.66 24-Aug-2015 pooka

to garnish, dust with _KERNEL_OPT


Revision tags: nick-nhusb-base-20150606
# 1.65 13-May-2015 pgoyette

Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and
SYSVMSG options. Move associated variables out of param.c and into
the module's source file.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.64 09-Jun-2012 christos

branches: 1.64.2; 1.64.16;
Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9
# 1.63 08-Feb-2010 joerg

branches: 1.63.10;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 jym-xensuspend-base
# 1.62 03-May-2009 elad

branches: 1.62.2;
Move dovfsusermount to secmodel_bsd44, where it really belongs.

The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html


# 1.61 02-May-2009 pooka

Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)


Revision tags: nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.60 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.


Revision tags: nick-hppapmap-base2 haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.59 12-Nov-2008 ad

branches: 1.59.4;
Allow the POSIX semaphore code to be loaded as a module.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.58 12-Jul-2008 gmcgarry

branches: 1.58.2;
Disable INCLUDE_CONFIG_FILE if compiling with PCC, since PCC cannot
handle 80KB string literals. Documented as hack.


# 1.57 02-Jul-2008 ad

branches: 1.57.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.56 27-Mar-2008 ad

branches: 1.56.4; 1.56.6; 1.56.8;
ALIGNBYTES + 1, not ALIGNBYTES in previous.


# 1.55 27-Mar-2008 ad

Introduce COHERENCY_UNIT/coherency_unit as proposed on tech-kern.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.54 15-Mar-2008 ad

Add a 'maxcpus' global.


Revision tags: nick-net80211-sync-base vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.53 26-Dec-2007 ad

branches: 1.53.2; 1.53.6;
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.


Revision tags: nick-csl-alignment-base5 matt-armv6-prevmlocking yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base jmcneill-pm-base nick-csl-alignment-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base
# 1.52 17-May-2007 yamt

branches: 1.52.8; 1.52.14; 1.52.16; 1.52.20;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.51 20-Jan-2007 ad

branches: 1.51.2; 1.51.6; 1.51.8;
Remove long unused 'ncallout'.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.50 21-Dec-2005 yamt

branches: 1.50.20;
defparam NMBCLUSTERS.


# 1.49 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base kent-audio1-beforemerge kent-audio1-base ktrace-lwp-base
# 1.48 27-Sep-2004 christos

branches: 1.48.12;
Disable autonicetime. As discusses in tech-kern.


# 1.47 01-Jul-2004 yamt

avoid divide-by-zero in adjtime1() in the case of HZ > 6000.


# 1.46 01-Jul-2004 yamt

defparam HZ.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.45 31-Dec-2003 martin

s/NBPG/PAGE_SIZE/ in a comment.
From Jeff Ito in PR kern/23935.


# 1.44 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.43 30-Oct-2003 drochner

there is no SHMMMNI


# 1.42 21-Oct-2003 thorpej

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.


# 1.41 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base kqueue-base
# 1.40 17-Dec-2001 atatat

branches: 1.40.16;
Provide hooks to include the config file(s) in the kernel binary.


Revision tags: thorpej-mips-cache-base
# 1.39 08-Nov-2001 lukem

add RCSID


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.38 20-Aug-2001 mrg

branches: 1.38.4;
allow SHMMAX, SHMMIN, SHMMNI and SHMSEG to be specified in the kernel config file.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.37 11-Nov-2000 mycroft

branches: 1.37.2; 1.37.4;
Make SHMSEG much larger to accomodate GNOME and imlib.
It's limited by SHMMAXPGS anyway.


# 1.36 24-Sep-2000 jdolecek

defopt SHMMAXPGS, SEMMNI, SEMMNS, SEMUME and SEMMNU


Revision tags: netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.35 15-Apr-2000 simonb

branches: 1.35.4;
Remove shmsegs declaration from conf/param.c - it doesn't belong here.
Instead, put it in kern/sysv_shm.c.


# 1.34 28-Mar-2000 simonb

Declare the SysV IPC *info structures and shmsegs pointer as extern.
Add declaration for shmsegs to param.c after shminfo structure.


# 1.33 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base chs-ubc2-base
# 1.31 20-May-1999 lukem

branches: 1.31.2; 1.31.8;
remove nbuf, nswbuf. cleanup def of AUTONICE(TIME|VAL)


# 1.30 20-May-1999 cgd

g.c. now-unneeded variable declarations (cfree, swbuf, utsname


# 1.29 26-Apr-1999 thorpej

Add `mblowat' and `mcllowat' low water mark variables for mbufs and mbuf
clusters.


# 1.28 25-Apr-1999 simonb

Const msize & mclbytes.


# 1.27 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.26 22-Apr-1999 simonb

Move inclusion of "opt_sb_max.h" from sys/socketvar.h to
conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c. Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base kenh-if-detach-base chs-ubc-base
# 1.25 23-Oct-1998 jonathan

branches: 1.25.8;
Compute compile-time value of old-VM parameter MAX_KMAPENT from NPROC
(2x NPROC plus slop) unless expclitly set. Use current constant value
(100) as a lower bound, as suggested by Chuck Cranor.

Move NPROC and other parameter definitions from param.c to param.h so
they are visible to vm/vm_map.h.

Systems with hand-tuned NPROC should now support that many processes.


# 1.24 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


Revision tags: eeh-paddr_t-base
# 1.23 05-Feb-1998 mrg

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly. :-)


Revision tags: netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.22 20-Sep-1997 enami

branches: 1.22.2;
Convert RTC_OFFSET, DEVPAGER, SWAPPAGER and VNODEPAGER to be declared
by defopt.


Revision tags: thorpej-signal-base marc-pcmcia-bp is-newarp-before-merge
# 1.21 28-Feb-1997 jonathan

branches: 1.21.4;
Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".

Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.


Revision tags: is-newarp-base
# 1.20 30-Jan-1997 tls

branches: 1.20.4;
fix a large number of braindead unconditional #defines


# 1.19 15-Jan-1997 perry

Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.


# 1.18 02-Oct-1996 ws

branches: 1.18.2;
Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.


# 1.17 17-Jul-1996 explorer

Add compile-time and run-time control over automatic niceing


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-Mar-1996 mrg

default DST and TIMEZONE to 0, if not already defined


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.15 08-Mar-1995 cgd

don't do things that should only be necessary for 'real' clists.


# 1.14 05-Dec-1994 mycroft

Minor style cleanup.


# 1.13 30-Aug-1994 mycroft

Convert process, file, and namei lists and hash tables to use queue.h.


# 1.12 22-Aug-1994 deraadt

initialize shmmax to `# of pages' at compile time; multiply by NBPG at
boot time (in shminit). This supports architecture families with varying
values for NBPG, and does not break ipcs.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.11 29-Jun-1994 cgd

New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'


# 1.10 27-Jun-1994 cgd

new standard, minimally intrusive ID format


# 1.9 08-Jun-1994 mycroft

Update for 4.4 fs code.


# 1.8 21-May-1994 cgd

maxfdescs checks out


# 1.7 17-May-1994 cgd

copyright foo


# 1.6 18-Dec-1993 mycroft

Canonicalize all #includes.


# 1.5 14-Nov-1993 cgd

Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>


Revision tags: magnum-base netbsd-0-9-patch-001 netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.4 20-May-1993 cgd

branches: 1.4.4;
fixed rcsids and cleaned up headers


# 1.3 06-May-1993 cgd

diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.2 04-Apr-1993 cgd

added maxfdescs definition


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.69 12-Nov-2020 simonb

Set a better default for MAXFILES on larger RAM machines if not
otherwise specified the kernel config file. Arbitary numbers are
20,000 files for 16GB RAM or more and 10,000 files for 1GB RAM or
more.

TODO: Adjust this and other values totally dynamically.


Revision tags: thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.68 09-Apr-2019 pgoyette

defparam all of the config variables associated with SYSV IPC stuff.
The variables were removed from sys/conf/param.c and moved into the
SYSV IPC code, but config options were never propagated via any opt_*
file.

This should fix an issue reported on netbsd-users list from Dima Veselov.

Note that this does not address other parameters included in that report,
including CHILD_MAX and NOFILE; this commit only affects items related to
the SYSV IPC code. Also note that this does not affect non-built-in
sysv_ipc modules, for which you need to update the Makefile to use any
non-standard config values - just like any other non-built-in modules
which have config params.

XXX Pull-up to -8 and -8-0

XXX Note that there are a couple of panic() calls in msginit() which
XXX really should be changed to simple printf() and then result in
XXX msginit failure. Unfortunately msginit() currently doesn't return
XXX a value so we cannot indicate failure to the caller. I will fix
XXX this is a future commit.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.67 09-Nov-2015 pgoyette

branches: 1.67.10; 1.67.18;
Whether or not the semaphore code is loaded as a module or built-in, its
sysctl data belongs with the module code. Move it from kern/init_sysctl.c
to kern/uipc_sem.c

While here, add a new sysctl variable kern.posix.semcnt (current count of
semaphores) to complement the existing kern.posix.semmax (maximum number
of semaphores).


Revision tags: nick-nhusb-base-20150921
# 1.66 24-Aug-2015 pooka

to garnish, dust with _KERNEL_OPT


Revision tags: nick-nhusb-base-20150606
# 1.65 13-May-2015 pgoyette

Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and
SYSVMSG options. Move associated variables out of param.c and into
the module's source file.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.64 09-Jun-2012 christos

branches: 1.64.2; 1.64.16;
Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9
# 1.63 08-Feb-2010 joerg

branches: 1.63.10;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 jym-xensuspend-base
# 1.62 03-May-2009 elad

branches: 1.62.2;
Move dovfsusermount to secmodel_bsd44, where it really belongs.

The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html


# 1.61 02-May-2009 pooka

Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)


Revision tags: nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.60 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.


Revision tags: nick-hppapmap-base2 haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.59 12-Nov-2008 ad

branches: 1.59.4;
Allow the POSIX semaphore code to be loaded as a module.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.58 12-Jul-2008 gmcgarry

branches: 1.58.2;
Disable INCLUDE_CONFIG_FILE if compiling with PCC, since PCC cannot
handle 80KB string literals. Documented as hack.


# 1.57 02-Jul-2008 ad

branches: 1.57.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.56 27-Mar-2008 ad

branches: 1.56.4; 1.56.6; 1.56.8;
ALIGNBYTES + 1, not ALIGNBYTES in previous.


# 1.55 27-Mar-2008 ad

Introduce COHERENCY_UNIT/coherency_unit as proposed on tech-kern.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.54 15-Mar-2008 ad

Add a 'maxcpus' global.


Revision tags: nick-net80211-sync-base vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.53 26-Dec-2007 ad

branches: 1.53.2; 1.53.6;
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.


Revision tags: nick-csl-alignment-base5 matt-armv6-prevmlocking yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base jmcneill-pm-base nick-csl-alignment-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base
# 1.52 17-May-2007 yamt

branches: 1.52.8; 1.52.14; 1.52.16; 1.52.20;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.51 20-Jan-2007 ad

branches: 1.51.2; 1.51.6; 1.51.8;
Remove long unused 'ncallout'.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.50 21-Dec-2005 yamt

branches: 1.50.20;
defparam NMBCLUSTERS.


# 1.49 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base kent-audio1-beforemerge kent-audio1-base ktrace-lwp-base
# 1.48 27-Sep-2004 christos

branches: 1.48.12;
Disable autonicetime. As discusses in tech-kern.


# 1.47 01-Jul-2004 yamt

avoid divide-by-zero in adjtime1() in the case of HZ > 6000.


# 1.46 01-Jul-2004 yamt

defparam HZ.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.45 31-Dec-2003 martin

s/NBPG/PAGE_SIZE/ in a comment.
From Jeff Ito in PR kern/23935.


# 1.44 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.43 30-Oct-2003 drochner

there is no SHMMMNI


# 1.42 21-Oct-2003 thorpej

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.


# 1.41 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base kqueue-base
# 1.40 17-Dec-2001 atatat

branches: 1.40.16;
Provide hooks to include the config file(s) in the kernel binary.


Revision tags: thorpej-mips-cache-base
# 1.39 08-Nov-2001 lukem

add RCSID


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.38 20-Aug-2001 mrg

branches: 1.38.4;
allow SHMMAX, SHMMIN, SHMMNI and SHMSEG to be specified in the kernel config file.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.37 11-Nov-2000 mycroft

branches: 1.37.2; 1.37.4;
Make SHMSEG much larger to accomodate GNOME and imlib.
It's limited by SHMMAXPGS anyway.


# 1.36 24-Sep-2000 jdolecek

defopt SHMMAXPGS, SEMMNI, SEMMNS, SEMUME and SEMMNU


Revision tags: netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.35 15-Apr-2000 simonb

branches: 1.35.4;
Remove shmsegs declaration from conf/param.c - it doesn't belong here.
Instead, put it in kern/sysv_shm.c.


# 1.34 28-Mar-2000 simonb

Declare the SysV IPC *info structures and shmsegs pointer as extern.
Add declaration for shmsegs to param.c after shminfo structure.


# 1.33 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base chs-ubc2-base
# 1.31 20-May-1999 lukem

branches: 1.31.2; 1.31.8;
remove nbuf, nswbuf. cleanup def of AUTONICE(TIME|VAL)


# 1.30 20-May-1999 cgd

g.c. now-unneeded variable declarations (cfree, swbuf, utsname


# 1.29 26-Apr-1999 thorpej

Add `mblowat' and `mcllowat' low water mark variables for mbufs and mbuf
clusters.


# 1.28 25-Apr-1999 simonb

Const msize & mclbytes.


# 1.27 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.26 22-Apr-1999 simonb

Move inclusion of "opt_sb_max.h" from sys/socketvar.h to
conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c. Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base kenh-if-detach-base chs-ubc-base
# 1.25 23-Oct-1998 jonathan

branches: 1.25.8;
Compute compile-time value of old-VM parameter MAX_KMAPENT from NPROC
(2x NPROC plus slop) unless expclitly set. Use current constant value
(100) as a lower bound, as suggested by Chuck Cranor.

Move NPROC and other parameter definitions from param.c to param.h so
they are visible to vm/vm_map.h.

Systems with hand-tuned NPROC should now support that many processes.


# 1.24 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


Revision tags: eeh-paddr_t-base
# 1.23 05-Feb-1998 mrg

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly. :-)


Revision tags: netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.22 20-Sep-1997 enami

branches: 1.22.2;
Convert RTC_OFFSET, DEVPAGER, SWAPPAGER and VNODEPAGER to be declared
by defopt.


Revision tags: thorpej-signal-base marc-pcmcia-bp is-newarp-before-merge
# 1.21 28-Feb-1997 jonathan

branches: 1.21.4;
Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".

Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.


Revision tags: is-newarp-base
# 1.20 30-Jan-1997 tls

branches: 1.20.4;
fix a large number of braindead unconditional #defines


# 1.19 15-Jan-1997 perry

Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.


# 1.18 02-Oct-1996 ws

branches: 1.18.2;
Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.


# 1.17 17-Jul-1996 explorer

Add compile-time and run-time control over automatic niceing


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-Mar-1996 mrg

default DST and TIMEZONE to 0, if not already defined


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.15 08-Mar-1995 cgd

don't do things that should only be necessary for 'real' clists.


# 1.14 05-Dec-1994 mycroft

Minor style cleanup.


# 1.13 30-Aug-1994 mycroft

Convert process, file, and namei lists and hash tables to use queue.h.


# 1.12 22-Aug-1994 deraadt

initialize shmmax to `# of pages' at compile time; multiply by NBPG at
boot time (in shminit). This supports architecture families with varying
values for NBPG, and does not break ipcs.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.11 29-Jun-1994 cgd

New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'


# 1.10 27-Jun-1994 cgd

new standard, minimally intrusive ID format


# 1.9 08-Jun-1994 mycroft

Update for 4.4 fs code.


# 1.8 21-May-1994 cgd

maxfdescs checks out


# 1.7 17-May-1994 cgd

copyright foo


# 1.6 18-Dec-1993 mycroft

Canonicalize all #includes.


# 1.5 14-Nov-1993 cgd

Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>


Revision tags: magnum-base netbsd-0-9-patch-001 netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.4 20-May-1993 cgd

branches: 1.4.4;
fixed rcsids and cleaned up headers


# 1.3 06-May-1993 cgd

diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.2 04-Apr-1993 cgd

added maxfdescs definition


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: isaki-audio2-base
# 1.68 09-Apr-2019 pgoyette

defparam all of the config variables associated with SYSV IPC stuff.
The variables were removed from sys/conf/param.c and moved into the
SYSV IPC code, but config options were never propagated via any opt_*
file.

This should fix an issue reported on netbsd-users list from Dima Veselov.

Note that this does not address other parameters included in that report,
including CHILD_MAX and NOFILE; this commit only affects items related to
the SYSV IPC code. Also note that this does not affect non-built-in
sysv_ipc modules, for which you need to update the Makefile to use any
non-standard config values - just like any other non-built-in modules
which have config params.

XXX Pull-up to -8 and -8-0

XXX Note that there are a couple of panic() calls in msginit() which
XXX really should be changed to simple printf() and then result in
XXX msginit failure. Unfortunately msginit() currently doesn't return
XXX a value so we cannot indicate failure to the caller. I will fix
XXX this is a future commit.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.67 09-Nov-2015 pgoyette

branches: 1.67.10;
Whether or not the semaphore code is loaded as a module or built-in, its
sysctl data belongs with the module code. Move it from kern/init_sysctl.c
to kern/uipc_sem.c

While here, add a new sysctl variable kern.posix.semcnt (current count of
semaphores) to complement the existing kern.posix.semmax (maximum number
of semaphores).


Revision tags: nick-nhusb-base-20150921
# 1.66 24-Aug-2015 pooka

to garnish, dust with _KERNEL_OPT


Revision tags: nick-nhusb-base-20150606
# 1.65 13-May-2015 pgoyette

Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and
SYSVMSG options. Move associated variables out of param.c and into
the module's source file.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.64 09-Jun-2012 christos

branches: 1.64.2; 1.64.16;
Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9
# 1.63 08-Feb-2010 joerg

branches: 1.63.10;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 jym-xensuspend-base
# 1.62 03-May-2009 elad

branches: 1.62.2;
Move dovfsusermount to secmodel_bsd44, where it really belongs.

The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html


# 1.61 02-May-2009 pooka

Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)


Revision tags: nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.60 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.


Revision tags: nick-hppapmap-base2 haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.59 12-Nov-2008 ad

branches: 1.59.4;
Allow the POSIX semaphore code to be loaded as a module.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.58 12-Jul-2008 gmcgarry

branches: 1.58.2;
Disable INCLUDE_CONFIG_FILE if compiling with PCC, since PCC cannot
handle 80KB string literals. Documented as hack.


# 1.57 02-Jul-2008 ad

branches: 1.57.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.56 27-Mar-2008 ad

branches: 1.56.4; 1.56.6; 1.56.8;
ALIGNBYTES + 1, not ALIGNBYTES in previous.


# 1.55 27-Mar-2008 ad

Introduce COHERENCY_UNIT/coherency_unit as proposed on tech-kern.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.54 15-Mar-2008 ad

Add a 'maxcpus' global.


Revision tags: nick-net80211-sync-base vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.53 26-Dec-2007 ad

branches: 1.53.2; 1.53.6;
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.


Revision tags: nick-csl-alignment-base5 matt-armv6-prevmlocking yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base jmcneill-pm-base nick-csl-alignment-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base
# 1.52 17-May-2007 yamt

branches: 1.52.8; 1.52.14; 1.52.16; 1.52.20;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.51 20-Jan-2007 ad

branches: 1.51.2; 1.51.6; 1.51.8;
Remove long unused 'ncallout'.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.50 21-Dec-2005 yamt

branches: 1.50.20;
defparam NMBCLUSTERS.


# 1.49 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base kent-audio1-beforemerge kent-audio1-base ktrace-lwp-base
# 1.48 27-Sep-2004 christos

branches: 1.48.12;
Disable autonicetime. As discusses in tech-kern.


# 1.47 01-Jul-2004 yamt

avoid divide-by-zero in adjtime1() in the case of HZ > 6000.


# 1.46 01-Jul-2004 yamt

defparam HZ.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.45 31-Dec-2003 martin

s/NBPG/PAGE_SIZE/ in a comment.
From Jeff Ito in PR kern/23935.


# 1.44 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.43 30-Oct-2003 drochner

there is no SHMMMNI


# 1.42 21-Oct-2003 thorpej

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.


# 1.41 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base kqueue-base
# 1.40 17-Dec-2001 atatat

branches: 1.40.16;
Provide hooks to include the config file(s) in the kernel binary.


Revision tags: thorpej-mips-cache-base
# 1.39 08-Nov-2001 lukem

add RCSID


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.38 20-Aug-2001 mrg

branches: 1.38.4;
allow SHMMAX, SHMMIN, SHMMNI and SHMSEG to be specified in the kernel config file.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.37 11-Nov-2000 mycroft

branches: 1.37.2; 1.37.4;
Make SHMSEG much larger to accomodate GNOME and imlib.
It's limited by SHMMAXPGS anyway.


# 1.36 24-Sep-2000 jdolecek

defopt SHMMAXPGS, SEMMNI, SEMMNS, SEMUME and SEMMNU


Revision tags: netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.35 15-Apr-2000 simonb

branches: 1.35.4;
Remove shmsegs declaration from conf/param.c - it doesn't belong here.
Instead, put it in kern/sysv_shm.c.


# 1.34 28-Mar-2000 simonb

Declare the SysV IPC *info structures and shmsegs pointer as extern.
Add declaration for shmsegs to param.c after shminfo structure.


# 1.33 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base chs-ubc2-base
# 1.31 20-May-1999 lukem

branches: 1.31.2; 1.31.8;
remove nbuf, nswbuf. cleanup def of AUTONICE(TIME|VAL)


# 1.30 20-May-1999 cgd

g.c. now-unneeded variable declarations (cfree, swbuf, utsname


# 1.29 26-Apr-1999 thorpej

Add `mblowat' and `mcllowat' low water mark variables for mbufs and mbuf
clusters.


# 1.28 25-Apr-1999 simonb

Const msize & mclbytes.


# 1.27 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.26 22-Apr-1999 simonb

Move inclusion of "opt_sb_max.h" from sys/socketvar.h to
conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c. Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base kenh-if-detach-base chs-ubc-base
# 1.25 23-Oct-1998 jonathan

branches: 1.25.8;
Compute compile-time value of old-VM parameter MAX_KMAPENT from NPROC
(2x NPROC plus slop) unless expclitly set. Use current constant value
(100) as a lower bound, as suggested by Chuck Cranor.

Move NPROC and other parameter definitions from param.c to param.h so
they are visible to vm/vm_map.h.

Systems with hand-tuned NPROC should now support that many processes.


# 1.24 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


Revision tags: eeh-paddr_t-base
# 1.23 05-Feb-1998 mrg

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly. :-)


Revision tags: netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.22 20-Sep-1997 enami

branches: 1.22.2;
Convert RTC_OFFSET, DEVPAGER, SWAPPAGER and VNODEPAGER to be declared
by defopt.


Revision tags: thorpej-signal-base marc-pcmcia-bp is-newarp-before-merge
# 1.21 28-Feb-1997 jonathan

branches: 1.21.4;
Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".

Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.


Revision tags: is-newarp-base
# 1.20 30-Jan-1997 tls

branches: 1.20.4;
fix a large number of braindead unconditional #defines


# 1.19 15-Jan-1997 perry

Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.


# 1.18 02-Oct-1996 ws

branches: 1.18.2;
Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.


# 1.17 17-Jul-1996 explorer

Add compile-time and run-time control over automatic niceing


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-Mar-1996 mrg

default DST and TIMEZONE to 0, if not already defined


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.15 08-Mar-1995 cgd

don't do things that should only be necessary for 'real' clists.


# 1.14 05-Dec-1994 mycroft

Minor style cleanup.


# 1.13 30-Aug-1994 mycroft

Convert process, file, and namei lists and hash tables to use queue.h.


# 1.12 22-Aug-1994 deraadt

initialize shmmax to `# of pages' at compile time; multiply by NBPG at
boot time (in shminit). This supports architecture families with varying
values for NBPG, and does not break ipcs.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.11 29-Jun-1994 cgd

New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'


# 1.10 27-Jun-1994 cgd

new standard, minimally intrusive ID format


# 1.9 08-Jun-1994 mycroft

Update for 4.4 fs code.


# 1.8 21-May-1994 cgd

maxfdescs checks out


# 1.7 17-May-1994 cgd

copyright foo


# 1.6 18-Dec-1993 mycroft

Canonicalize all #includes.


# 1.5 14-Nov-1993 cgd

Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>


Revision tags: magnum-base netbsd-0-9-patch-001 netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.4 20-May-1993 cgd

branches: 1.4.4;
fixed rcsids and cleaned up headers


# 1.3 06-May-1993 cgd

diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.2 04-Apr-1993 cgd

added maxfdescs definition


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.67 09-Nov-2015 pgoyette

Whether or not the semaphore code is loaded as a module or built-in, its
sysctl data belongs with the module code. Move it from kern/init_sysctl.c
to kern/uipc_sem.c

While here, add a new sysctl variable kern.posix.semcnt (current count of
semaphores) to complement the existing kern.posix.semmax (maximum number
of semaphores).


Revision tags: nick-nhusb-base-20150921
# 1.66 24-Aug-2015 pooka

to garnish, dust with _KERNEL_OPT


Revision tags: nick-nhusb-base-20150606
# 1.65 13-May-2015 pgoyette

Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and
SYSVMSG options. Move associated variables out of param.c and into
the module's source file.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.64 09-Jun-2012 christos

branches: 1.64.16;
Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9
# 1.63 08-Feb-2010 joerg

branches: 1.63.10;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 jym-xensuspend-base
# 1.62 03-May-2009 elad

branches: 1.62.2;
Move dovfsusermount to secmodel_bsd44, where it really belongs.

The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html


# 1.61 02-May-2009 pooka

Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)


Revision tags: nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base
# 1.60 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.


Revision tags: nick-hppapmap-base2 haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.59 12-Nov-2008 ad

branches: 1.59.4;
Allow the POSIX semaphore code to be loaded as a module.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.58 12-Jul-2008 gmcgarry

branches: 1.58.2;
Disable INCLUDE_CONFIG_FILE if compiling with PCC, since PCC cannot
handle 80KB string literals. Documented as hack.


# 1.57 02-Jul-2008 ad

branches: 1.57.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base
# 1.56 27-Mar-2008 ad

branches: 1.56.4; 1.56.6; 1.56.8;
ALIGNBYTES + 1, not ALIGNBYTES in previous.


# 1.55 27-Mar-2008 ad

Introduce COHERENCY_UNIT/coherency_unit as proposed on tech-kern.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.54 15-Mar-2008 ad

Add a 'maxcpus' global.


Revision tags: nick-net80211-sync-base vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.53 26-Dec-2007 ad

branches: 1.53.2; 1.53.6;
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.


Revision tags: nick-csl-alignment-base5 matt-armv6-prevmlocking yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base jmcneill-pm-base nick-csl-alignment-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base
# 1.52 17-May-2007 yamt

branches: 1.52.8; 1.52.14; 1.52.16; 1.52.20;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.51 20-Jan-2007 ad

branches: 1.51.2; 1.51.6; 1.51.8;
Remove long unused 'ncallout'.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.50 21-Dec-2005 yamt

branches: 1.50.20;
defparam NMBCLUSTERS.


# 1.49 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base kent-audio1-beforemerge kent-audio1-base ktrace-lwp-base
# 1.48 27-Sep-2004 christos

branches: 1.48.12;
Disable autonicetime. As discusses in tech-kern.


# 1.47 01-Jul-2004 yamt

avoid divide-by-zero in adjtime1() in the case of HZ > 6000.


# 1.46 01-Jul-2004 yamt

defparam HZ.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.45 31-Dec-2003 martin

s/NBPG/PAGE_SIZE/ in a comment.
From Jeff Ito in PR kern/23935.


# 1.44 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.43 30-Oct-2003 drochner

there is no SHMMMNI


# 1.42 21-Oct-2003 thorpej

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.


# 1.41 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base kqueue-base
# 1.40 17-Dec-2001 atatat

branches: 1.40.16;
Provide hooks to include the config file(s) in the kernel binary.


Revision tags: thorpej-mips-cache-base
# 1.39 08-Nov-2001 lukem

add RCSID


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.38 20-Aug-2001 mrg

branches: 1.38.4;
allow SHMMAX, SHMMIN, SHMMNI and SHMSEG to be specified in the kernel config file.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.37 11-Nov-2000 mycroft

branches: 1.37.2; 1.37.4;
Make SHMSEG much larger to accomodate GNOME and imlib.
It's limited by SHMMAXPGS anyway.


# 1.36 24-Sep-2000 jdolecek

defopt SHMMAXPGS, SEMMNI, SEMMNS, SEMUME and SEMMNU


Revision tags: netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.35 15-Apr-2000 simonb

branches: 1.35.4;
Remove shmsegs declaration from conf/param.c - it doesn't belong here.
Instead, put it in kern/sysv_shm.c.


# 1.34 28-Mar-2000 simonb

Declare the SysV IPC *info structures and shmsegs pointer as extern.
Add declaration for shmsegs to param.c after shminfo structure.


# 1.33 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base chs-ubc2-base
# 1.31 20-May-1999 lukem

branches: 1.31.2; 1.31.8;
remove nbuf, nswbuf. cleanup def of AUTONICE(TIME|VAL)


# 1.30 20-May-1999 cgd

g.c. now-unneeded variable declarations (cfree, swbuf, utsname


# 1.29 26-Apr-1999 thorpej

Add `mblowat' and `mcllowat' low water mark variables for mbufs and mbuf
clusters.


# 1.28 25-Apr-1999 simonb

Const msize & mclbytes.


# 1.27 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.26 22-Apr-1999 simonb

Move inclusion of "opt_sb_max.h" from sys/socketvar.h to
conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c. Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base kenh-if-detach-base chs-ubc-base
# 1.25 23-Oct-1998 jonathan

branches: 1.25.8;
Compute compile-time value of old-VM parameter MAX_KMAPENT from NPROC
(2x NPROC plus slop) unless expclitly set. Use current constant value
(100) as a lower bound, as suggested by Chuck Cranor.

Move NPROC and other parameter definitions from param.c to param.h so
they are visible to vm/vm_map.h.

Systems with hand-tuned NPROC should now support that many processes.


# 1.24 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


Revision tags: eeh-paddr_t-base
# 1.23 05-Feb-1998 mrg

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly. :-)


Revision tags: netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.22 20-Sep-1997 enami

branches: 1.22.2;
Convert RTC_OFFSET, DEVPAGER, SWAPPAGER and VNODEPAGER to be declared
by defopt.


Revision tags: thorpej-signal-base marc-pcmcia-bp is-newarp-before-merge
# 1.21 28-Feb-1997 jonathan

branches: 1.21.4;
Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".

Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.


Revision tags: is-newarp-base
# 1.20 30-Jan-1997 tls

branches: 1.20.4;
fix a large number of braindead unconditional #defines


# 1.19 15-Jan-1997 perry

Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.


# 1.18 02-Oct-1996 ws

branches: 1.18.2;
Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.


# 1.17 17-Jul-1996 explorer

Add compile-time and run-time control over automatic niceing


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-Mar-1996 mrg

default DST and TIMEZONE to 0, if not already defined


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.15 08-Mar-1995 cgd

don't do things that should only be necessary for 'real' clists.


# 1.14 05-Dec-1994 mycroft

Minor style cleanup.


# 1.13 30-Aug-1994 mycroft

Convert process, file, and namei lists and hash tables to use queue.h.


# 1.12 22-Aug-1994 deraadt

initialize shmmax to `# of pages' at compile time; multiply by NBPG at
boot time (in shminit). This supports architecture families with varying
values for NBPG, and does not break ipcs.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.11 29-Jun-1994 cgd

New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'


# 1.10 27-Jun-1994 cgd

new standard, minimally intrusive ID format


# 1.9 08-Jun-1994 mycroft

Update for 4.4 fs code.


# 1.8 21-May-1994 cgd

maxfdescs checks out


# 1.7 17-May-1994 cgd

copyright foo


# 1.6 18-Dec-1993 mycroft

Canonicalize all #includes.


# 1.5 14-Nov-1993 cgd

Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>


Revision tags: magnum-base netbsd-0-9-patch-001 netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.4 20-May-1993 cgd

branches: 1.4.4;
fixed rcsids and cleaned up headers


# 1.3 06-May-1993 cgd

diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.2 04-Apr-1993 cgd

added maxfdescs definition


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision