**************************************************************************
* Copyright 1990-1995, Silicon Graphics, Inc. 
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or 
* duplicated in any form, in whole or in part, without the prior written 
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions 
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or 
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - 
* rights reserved under the Copyright Laws of the United States.
**************************************************************************
*
*#ident "$Revision: 1.90 $"

* This is a read-only file. User-specified tunables are stored
* in var/sysgen/stune file.
*
* kernel
*



* tunables that turn on/off features
*
* nosuidshells: to allow setuid shells set to 0
* restricted_chown = 1   bsd style chown(2), only super-user can give away files
* restricted_chown = 0 sysV style chown(2), non super-user can give away files
* posix_tty_default = 0 ==> run our default line discipline and settings
* posix_tty_default = 1 ==> match tty parameters/POSIX test assumptions
* use_old_serialnum = 1 ==> Force the kernel to use the old method of
*			calculating a 32-bit serial number for sysinfo -s.
*			This variable only affects Onyx/Challenge L/XL systems.
* reboot_on_panic = -1 ==> Use machine dependent reboot after panic semantics.
* reboot_on_panic =  0 ==> Do not reboot the system after a panic (wait for
*			user to hit the system reset button).
* reboot_on_panic =  1 ==> Automatically reboot the system after a panic.
* restrict_fastprof = 1 ==> Don't allow users to do fast (1ms) user level
*			profiling.
* restrict_fastprof = 0 ==> Allow users to do fast (1ms) user level profiling.
* ip26_allow_ucmem = 0 ==> Accessing system memory uncached on Power Indigo2
*			is illegal and will cause a system crash.
* ip26_allow_ucmem = 1 ==> Accessing system memory on Power Indigo2 is
*			always legal.  This comes at a large memory access
*			performance hit.
* reset_limits_on_exec = 1 ==> Reset rlimits on exec of processes that are
*			setuid to root to prevent unprivileged processes from
*			enforcing resource limitations on setuid/setgid procs.
* reset_limits_on_exec = 0 ==> Don't reset limits on execs of setuid procs.
* tty_auto_strhold = 1 ==> automatically sets STRHOLD on ttys/ptys whenever
*			the line discipline is in canonical & echo mode and
*			automatically clears STRHOLD otherwise.
* tty_auto_strhold = 0 ==> STRHOLD on ptys/ttys is entirely under user control.
* run_kthread_daemons = 1 ==> Start vhand, shaked, and bdflush as kthreads
* run_kthread_daemons = 0 ==> Start vhand, shaked, and bdflush as normal procs
* add_kthread_stack = 0 ==> no additional kthread stack for kernel daemons
* add_kthread_stack != 0 ==> add add_kthread_stack bytes to kernel daemon stack
* xpg4_sticky_dir = 1 ==> write access to a file does not imply it is
*			  removable in a directory with the sticky bit set
* xpg4_sticky_dir = 0 ==> write access to a file implies that it is
*			  removable in a directory  with the sticky bit set
* mload_auto_rtsyms = 0 ==> Disable auto-loading of kernel's run-time symbol
*                           table for dynamic driver/module loading.
* disable_ip25_check = 1 ==> Disable boot time checking for valid (SUPPORTED)
*			SCC/R10k configurations.
* disable_r10k_log = 0 ==> Disable boot time logging of R10k config params.
*			such as clk divisors etc.

switch:	static

* name			default      	minimum		maximum
nosuidshells 		1
restricted_chown 	0
posix_tty_default	0
use_old_serialnum	0
reboot_on_panic		-1
restrict_fastprof	0
reset_limits_on_exec	1
ip26_allow_ucmem	0
run_kthread_daemons	1
add_kthread_stack	0
xpg4_sticky_dir		1
mload_auto_rtsyms	1
disable_ip25_check	0
disable_r10k_log	0

switch: run
* name			default      	minimum		maximum
tty_auto_strhold	0

* miscellaneous static tuneables
*
* io4ia_userdma_war	enable the error checking for concurrent user
*			dma operations into the same physical memory
*
misc: static

* name			default		minimum		maximum
io4ia_userdma_war	1

* 
* io4ia_war_enable	Enable io4ia_war on all configurations (without
*			checking if this configuration needs this).
*			To be used ONLY for testing purposes. It should 
*			be used only to enable io4ia_war on systems for
*			testing. Useful only on Challenge/Onyx platforms.
*
* name                  default         minimum         maximum
io4ia_war_enable	0

* miscellaneous dynamic tuneables 
*
* r4k_div_patch = 1	turn on exec patch code for binaries that have been
*			processed with r4kpp for the divide in branch delay slot
*			problem that occurs on R4000 SC rev 2.2 and 3.0 parts.
* corepluspid = 1	name core file as "core.pid"
* panic_on_sbe = 1	special factory debugging mode
* sbe_log_errors = 1	log single bit errors to SYSLOG
* sbe_mfr_override = 1 	overrides default action of disabling sbe's 
*			if rate of sbe's exceeds predetermined limit
* sbe_report_cons = 1   report single bit errors to console also
* ecc_recover_enable = 0  ==> don't attempt to recover from multibit errors
*		     > 0  ==> attempt to recover from some cases of multibit
*				errors, but no more than 32 errors every
*				"ecc_recover_enable" seconds (default 60 secs)
* munlddelay = 5	timeout for auto-unload for loadable modules
* dump_all_pages = 1    dump kernel and user and free pages during panic
*	   	   0    dump only kernel pages during panic
*
misc: run

* name			default		minimum		maximum
r4k_div_patch		0
corepluspid		0
panic_on_sbe		0
sbe_log_errors		0
sbe_mfr_override	0
sbe_report_cons		0
ecc_recover_enable	60
module_unld_delay	5		0
dump_all_pages		1

*
* tunables that set the limit
*
* ncargs is max # bytes of arguments passed during an exec(2)
* shlbmax :  Maximum number of libraries that can be
*            attached to a process at one time.
* maxwatchpoints:  maximum watchpoints per process
* nprofile: number of disjoint text spaces to be profiled 
* maxsymlinks is the maximum number of symlinks expanded in an pathname.
* reserve_ncallout: number of reserved callouts 
* maxup: the maximum number of processes per user, should always smaller than
*	 nproc
* vnode_free_ratio: proportion of free vnodes to vnodes in use.
*
* reserve_ncallout auto-config: max(5,numcpus)
* maxup limit: nproc - 20
* vnode_free_ratio auto-config: 2 (to one)
* idbgmaxfuncs = 1200   maximum number of dynamically loaded idbg functions

limits:	run

* name			default      	minimum		maximum
ncargs 			20480		5120		262144
shlbmax 		8		3		32
maxwatchpoints 		100		1		1000
nprofile 		100		100		200
maxsymlinks 		30		0		50
reserve_ncallout 	0		0		50     /* auto-config */
maxup			0		15		10000
vnode_free_ratio 	2		1		100
idbgmaxfuncs		1200

*
* tunables for resource limit
* 'cur' may be changed via any shell or setrlimit
* Limits specified as 0x7fffffffffffffff implies no limit.
*
* Note: rlimit_nofile_max must not be set to an unreasonably large value
* since many daemons/programs use rlimit_nofile_max as an indication
* of how many file descriptors to close when they want to close them all.
*

resource:	static

* name			default      		minimum	  maximum
rlimit_cpu_cur  	 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_cpu_max 		 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_fsize_cur 	 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_fsize_max 	 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_data_cur 	 0			0	0x7fffffffffffffff ll
rlimit_data_max 	 0			0	0x7fffffffffffffff ll
rlimit_stack_cur 	 0x04000000		0	0x7fffffffffffffff ll
rlimit_stack_max 	 0x20000000		0	0x7fffffffffffffff ll
rlimit_core_cur 	 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_core_max 	 0x7fffffffffffffff 	0	0x7fffffffffffffff ll
rlimit_vmem_cur 	 0			0	0x7fffffffffffffff ll
rlimit_vmem_max 	 0			0	0x7fffffffffffffff ll
rlimit_rss_cur 		 0			0	0x7fffffffffffffff ll
rlimit_rss_max 		 0x20000000		0	0x7fffffffffffffff ll
rlimit_nofile_cur 	 200			40	0x7fffffffffffffff ll
rlimit_nofile_max 	 2500			0	0x7fffffffffffffff ll

*
* tunables that depend on nproc
*
* nproc: maximum number of processes
* ndquot: maximum number of file system quota structures
* ncallout: initial # of callouts -- used to implement timeout calls
* callout_himark:  high water mark of callouts
* ncsize: directory-name lookup cache size
* ngroups_max: maximum number of groups to which user can belong
*
* nproc auto-config: 30 + KB(mem)/240
* ndquot auto-config: 200 + 2*nproc
* ncsize auto-config: 200 + 2*nproc
* ncallout auto-config: nproc/2
*
numproc:	static

* name			default      	minimum	  maximum
nproc			0		30	10000	/* auto-config */
ndquot			0		268	6200	/* auto-config */
callout_himark 		0		42	10000	/* auto-config */
ncallout 		0		20	5000	/* auto-config */
ncsize 			0               268     100000  /* auto-config */
ngroups_max 		16		0	32

*
* The following is for STREAMS.
*
streams:	static

* name			default      	minimum	  maximum
nstrpush 		 9		9	   10
nstrintr		 1024		32	   4096
strmsgsz 		 0x8000
strctlsz 		 1024
strpmonmax		 4		0	   1024

streams:	run

* name			default      	minimum	  maximum
strholdtime		50		0	  1000

*
* cpu actions -- interprocessor communication blocks
* nactions: number of action block, autoconfigure if 0
*
* nactions auto-config: max((maxcpus+60), (maxcpus*(maxcpus/2)))
*

actions:	static

* name			default      	minimum	  maximum
nactions 		0		60	   200	/* auto-config */

*
* tunables for queued signals
*
* maxsigq: used by sigqsetup()  - Posix.4 required at least 32
* since svr4 SA_SIGINFO signals also share this, make maxsigq >= NSIG+32
* results in
* sysconf(SIGQUEUE_MAX) = maxsigq - NSIG
*
signals:	run

* name			default      	minimum	  maximum
maxsigq 		96		96	

*
* tunables for timer
*
* fasthz: profiling/fast itimer clock speed. 
*
* itimer_on_clkcpu = 1 10 ms itimer request is queued on the clock processoro
* itimer_on_clkcpu = 0 0 ms itimer request is queued on the runing processor
* If a process does a setitimer then uses gettimeofday() to compare the
* accuracy of the itimer delivery then itimer_on_clkcpu should be set.
* If on the otherhand, itimer request is used to implement a user frequency
* based scheduler then itimer_on_clkcpu should be 0.
*
* timetrim: The clock is adjusted by this signed number of nanoseconds 
*	    every second. It is limited to 3 milliseconds or 0.3% in clock.c.
*	Timed(1M) and timeslave(1M) put suggested values in /usr/adm/SYSLOG.
*
timer:	static

* name			default      	minimum	  maximum
fasthz 			1000		500	   2500	
itimer_on_clkcpu 	0
timetrim 		0

*
* tunables for memory size
*
* maxpmem: the maximum physical memory to use, if maxpmem = 0,
*	   then use all available physical memory.
* syssegsz: max pages of dynamic system memory,
* maxdmasz: max dma transfer (in pages), must be no more than syssegsz / 2
* 	    and less than maxpmem  It is set to what it would be plus 1
*	    so that file system direct I/O can report a reasonably aligned
*	    maximum I/O size (maxdmasz - 1).
* maxpglst: maximum number of pages that can be held in each
*	    of the pager's pageout queues
*
* syssegsz auto-config: min(max(KB(mem)/2,0x2000),KSEGSIZE)
*
* Note: KSEGSIZE is system-specific, and defined (in bytes) in
*	<sys/mips_addrs.h>.  Thus, the maximum value given here
*	is just a WAG.
*
* maxdmasz auto-config: syssegsz/2
* maxpglst auto-config: min(max(KB(mem)/2048,100)+(numcpus-1)*16,1000)
*
memsize:	static

* name			default      	minimum	  maximum
maxpmem			0		1024
syssegsz,32		0		0x2000	  0x20000   /* auto-config */
syssegsz,64		0		0x2000	  0x10000000 /* auto-config */
maxdmasz,32		1025		1024	  syssegsz  /* auto-config */
maxdmasz,64		257		256	  syssegsz  /* auto-config */
maxpglst		0		50	  1000	    /* auto-config */

*
* Tuneable Paging parameters	
*
* gpgslo: If freemem < gpgslo, then start to steal pages from processes.
* gpgshi: Once we start to steal pages, don't  stop until freemem > gtpgshi.    
* gpgsmsk: Mask used by getpages to determine whether a page is stealable.
* maxsc: The maximum number of pages which will be swapped out in a single
*   	 operation.
* maxfc: The maximum number of pages which will be saved up and freed at once.
* maxdc: The maximum number of pages which will be saved up and written to
*	 disk (mappd files) at once.
* maxumem: Obsolete - see RLIMIT_VMEM
* minarmem: The minimum available resident (not swapable) memory to maintain in
*	    order to avoid deadlock.
* minasmem: The minimum available swapable memory to maintain in order to avoid
*	    deadlock.
* maxlkmem: The maximum amount of lockable pages per process
* tlbdrop: Number of ticks before a procs wired entries are flushed
* rsshogfrac: Fraction of memory RSS hogs can use
* rsshogslop: # pages excess of RSS before slow down process
* dwcluster: Maximum number of delayed write pages to cluster in each push.
* bdflushr: The rate at which bdflush is run, in seconds.
* autoup: The age a delayed-write buffer must be, in seconds,
*	  before bdflush will write it out.
* vfs_syncr: The rate at which vfs_syncr is run, in seconds.
*

paging:		run

* name			default      	minimum	  maximum
gpgslo			0
gpgshi			0		30
gpgsmsk			2		0	   7
maxsc			0		8	  maxpglst
maxfc			0		50	  maxpglst
maxdc			0		1	  maxpglst
bdflushr		5		1	  31536000
vfs_syncr		30		1	  31536000
minarmem		0
minasmem		0
maxlkmem		2000
tlbdrop			100
rsshogfrac		75		0	  100
rsshogslop		20
dwcluster		64
autoup			10		1  	   30


*
* tunables for buffer cache
*
* nbuf: number of  buffers in disk buffer cache. autoconfigure if 0
*
* nbuf auto-config: max(100+KB(mem)/160,6000)

bufcache:	static

* name			default      	minimum	  maximum
nbuf,32			0		  75	   6000
nbuf,64			0		  75	   250000

*
* tunables for module loader
*
* bdevsw_extra: number of extra entries for bdevsw
* cdevsw_extra: number of extra entries for cdevsw
* fmodsw_extra: number of extra entries for fmodsw
* vfssw_extra: number of extra entries for vfssw
*
mload:		static

* name			default      	minimum	  maximum
bdevsw_extra		21		1	  254
cdevsw_extra		23		3	  254
fmodsw_extra		20		0
vfssw_extra		5		0

*
* tunables for extended accounting features
*
* accounting controls
*   do_procacct	  = 1   perform BSD process accounting
*		  = 0	do not perform BSD process accounting (this overrides
*			the acct(2) call)
*   do_extpacct   = 1   perform extended process accounting
*		  = 0	do not perform extended process accounting
*   do_sessacct   = 1   perform array session accounting on process exit
*		  = 0   do not perform array session accounting
*
* session table controls
*   use_astbl     = 1	allocate array sessions in a single preallocated table
*	          = 0	array sessions are allocated dynamically
*   narsess:		number of entries in array session table.
*			If 0 is specified, value will be auto-configured
*			to nproc/10.
*
* array session handle settings
*   dfltash:  the default array session handle for special system sessions and
*	      other sessions that bypass ordinary session handle assignment
*   minash:   the first array session handle that can be assigned by the kernel
*   maxash:   the largest array session handle that can be assigned by the
*	      kernel before wrapping back to minash
*   asmachid: machine ID for generating global ASHs. No other machine in
*	      an array should have the same machine ID. If 0 is specified,
*	      the kernel will only generate local ASHs.
*
* project ID settings
*   dfltprid: the default project ID for special system sessions and other
*	      sessions that bypass ordinary project ID assignment.
*
extacct: static

* name			default		minimum		maximum
do_procacct		1
do_extpacct		0
do_sessacct		0
use_astbl,32		0
use_astbl,64		1

narsess			0		10		10000   /* auto-cfg */
dfltash			0		0		0x7fffffffffffffff ll
minash			1		1		0xffffff00         ll
maxash			65535		255		0xffffffff         ll
asmachid		0		0		0x7fff
dfltprid		0		0		0x7fffffffffffffff ll

*
* SGI internal use
*
* histmax: semaphore history
* conbufsz: console buffer sizes 
* putbufsz: put buffer sizes 
* dumplo: starting default offset in dumpdev to dump kernel when it crashes 
*
internal:	static

* name			default      	minimum	  maximum
histmax 		0
conbufsz 		1024
putbufsz 		1024
dumplo 			0

* tuneables for using very large pages
*
* Large pages must be allocated early on and reserved if they
* are to be used. nlpages_X refer to the number of large
* pages of size X. When these are set the kernel will attempt
* to allocate these counts of pages of the appropriate size.
*
* Applications which use large pages have the choice of wiring
* the translations for the pages into the usually random slots
* of the tlb when the application runs. The maximum number of
* tlb slots to devote to this is reflected in max_lpg_tlbslots.
*
large_pages:            static

* name                  default         minimum   maximum
nlpages_256k            0                 0          64
nlpages_1m              0                 0          64
nlpages_4m              0                 0          64
nlpages_16m             0                 0          64
max_lpg_tlbslots        8                 8          16

* Tuneables for Maximum simultaneous VME DMA transfer size on Challenge.
* Defines the size in Megabytes, of DMA transfer that can be active 
* for each VME bus in the system. E.g. a value of 64 implies, system
* will allocate sufficient resources to have upto 64 Mbytes of DMA
* active on each VME bus in the system. System needs to allocate 
* sufficient number of mapping table entries to support the required 
* transfer size. Each entry in memory is 4 bytes wide, and maps 
* a 4k bytes of contiguous data. With a page size of 16k, one (16k) 
* page is needed for 16M of simultaneous active DMA transfers. 
*
* Value for nvme32_dma should be a proper power of 2. If not, it will be 
* be bumped to next power of 2 before using. It must not exceed 512 or
* else it will be forced to 512. Notice that values larger than 64 may
* impact VME throughput on some systems.
*
vme_dma:		static
* name                  default         minimum   maximum
nvme32_dma		64		32	   512

*
* tunables for tcp/udp hash tables
*
* Hash tables are used to keep references to TCP and UDP socket addresses.
* Default sizing is based on the amount of physical memory in the system.
*
* The default is four hash buckets per megabyte for UDP and eight for TCP.
* TCP uses twice as many buckets as configured because a separate table is
* used for connections in TIME-WAIT.

inpcb:	static

* name			default      	minimum	  maximum
tcp_hashtablesz		0		0	  8192
udp_hashtablesz		0		0	  2048

*
* tuneables for IP networking
*
* icmp_dropredirects == 1: kernel does not honor ICMP_REDIRECT message.
*
* ipfilterd_inactive_behavior == 1: reject all packets when filtering
*	turned off. This has the effect of preventing any routing when
*	the daemon has been active, but has died.  This is the
*	preferred behavior for a firewall-type gateway. Note: even
*	when the value is 1, all IP packets destined for and sent from
*	the local host will still be accepted.  It's only
*	foreign-source packets that get clobbered.
* ipfilterd_inactive_behavior == 0: accept all packets when filtering
*	turned off. Acts as though filtering is not configured;
*	routing and other IP traffic unaffected.
*

net_ip:	static

* name				default	minimum	maximum
icmp_dropredirects		0	0	1
ipfilterd_inactive_behavior	1	0	1

