xref: /netbsd-src/share/man/man4/options.4 (revision 76dfffe33547c37f8bdd446e3e4ab0f3c16cea4b)
1.\"	$NetBSD: options.4,v 1.3 1996/11/15 18:52:41 perry Exp $
2.\"
3.\" Copyright (c) 1996
4.\" 	Perry E. Metzger.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed for the NetBSD Project
17.\"	by Perry E. Metzger.
18.\" 4. The name of the author may not be used to endorse or promote products
19.\"    derived from this software without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\"
33.Dd October 20, 1996
34.Os NetBSD 1.3
35.Dt OPTIONS 4
36.Sh NAME
37.Nm options
38.Nd Miscellaneous kernel configuration options
39.Sh SYNOPSIS
40.Cd options ...
41.Sh DESCRIPTION
42This manual page describes a number of miscellaneous kernel
43configuration options that may be specified in a kernel config
44file. See
45.Xr config 8
46for information on how to configure and build kernels.
47.Em Note:
48Options are passed to the compile process as -D flags to the C
49compiler, as is the name of the kernel. This means that kernel names
50(which are set by the file name passed to
51.Xr config 8 )
52and option names must not conflict! Naming your kernel
53.Em PORTAL
54or
55.Em GATEWAY
56or other such things is the equivalent of setting an option, and can
57have unintended consequences! (Unfortunately, not all possible kernel
58options are documented here. You may find out about one the hard way.)
59.Ss Compatibility Options
60.Bl -ohang
61.It Cd options COMPAT_09
62Enable binary compatibility with
63.Nx 0.9 .
64This enables support for
6516-bit user, group, and process ids (following revisions support
6632-bit identifiers),
67It also allows the use of the deprecated getdomainname, setdomainname,
68and uname syscalls.
69This option also allows using numeric fileystem identifiers rather
70than strings.  Post 0.9 versions use string identifiers.
71.It Cd options COMPAT_10
72Enable binary compatibility with
73.Nx 1.0 .
74This option allows the use of the filesystem name of
75.Dq ufs
76as an alias for
77.Dq ffs .
78The name
79.Dq ffs
80should be used post 1.0 in
81.Pa /etc/fstab
82and other files.  It also adds old syscalls for the
83.At V
84shared memory interface.  This was changed post 1.0 to work on 64-bit
85architectures.  This option also enables
86.Dq sgtty
87compatibility, without which programs using the old interface produce
88an
89.Dq inapropriate ioctl
90error.
91.It Cd options COMPAT_11
92Enable binary compatibility with
93.Nx 1.1 .
94This allows binaries running on the i386 port to gain direct access to
95the io ports by opening
96.Pa /dev/io
97read/write.  This functionality was
98replaced by
99.Xr i386_iopl 2
100post 1.1.
101On the
102.Tn Atari
103port, the location of the disk label was moved after 1.1. When the
104.Em COMPAT_11
105option is set, the kernel will read (pre) 1.1 style disk labels as a
106last resort. When a disklabel is re-written, the old style label will
107be replaced with a post 1.1 style label.
108.It Cd options COMPAT_12
109Enable binary compatibility with
110.Nx 1.2 .
111This allows the use of old syscalls for reboot.  The syscall number
112was changed post 1.2 to add functionality to the reboot syscall.
113.It Cd options COMPAT_43
114Enables compatibility with
115.Bx 4.3 .
116This adds an old syscall for lseek.  It also adds the ioctls for
117TIOCGETP and TIOCSETP.  The return values for getpid, getgid, and
118getuid syscalls are modified as well, to return the parent's pid and
119uid as well as the current process's.  It also enables the deprecated
120NTTYDISC terminal line disipline.
121It also provides backwards compatibility with
122.Dq old
123SIOC[GS]IF{ADDR,DSTADDR,BRDADDR,NETMASK} interface ioctls, including
124binary compatibility with code written before the introduction of the
125sa_len field in sockaddrs.
126It also enables
127support for some older pre BSD 4.4 socket calls.
128.It Cd options COMPAT_SVR4
129On those architectures that support it, this enables binary
130compatibility with
131.At V.4
132applications built for the same architecture.  This currently includes
133the sparc, and i386.
134.It Cd options COMPAT_LINUX
135On those architectures that support it, this enables binary
136compatibility with Linux ELF and a.out
137applications built for the same architecture.  This is currently limited
138to the i386.
139.It Cd options COMPAT_SUNOS
140On those architectures that support it, this enables binary
141compatibility with SunOS 4.1
142applications built for the same architecture.  This currently includes
143the sparc and most or all m68k platforms.
144.It Cd options COMPAT_ULTRIX
145On those architectures that support it, this enables binary
146compatibility with Ultrix
147applications built for the same architecture.  This currently is limited
148to the pmax.  The functionality of this option is unknown.
149.It Cd options COMPAT_FREEBSD
150On those architectures that support it, this enables binary
151compatibility with FreeBSD
152applications built for the same architecture.  This is obviously limited
153to the i386.
154.It Cd options COMPAT_HPUX
155On those architectures that support it, this enables binary
156compatibility with HP/UX
157applications built for the same architecture.  This is limited to the
158hp300 port, and has some known bugs.  A limited set of programs do work.
159.It Cd options COMPAT_IBCS2
160On those architectures that support it, this enables binary
161compatibility with iBCS2
162applications built for the same architecture.  This is currently
163limited to the i386.
164.It Cd options COMPAT_OSF1
165On those architectures that support it, this enables binary
166compatibility with Digital UNIX (formerly OSF/1)
167applications built for the same architecture.  This is currently
168limited to the alpha, and may not even work.
169.El
170.Ss Debugging Options
171.Bl -ohang
172.It Cd options DDB
173Compiles in a kernel debugger for diagnosing kernel problems. See
174.Xr ddb 4
175for details.
176.Em NOTE:
177not available on all architectures.
178.It Cd options KGDB
179Compiles in a remote kernel debugger stub for diagnosing kernel problems
180using the
181.Dq remote target
182feature of gdb. See
183.Xr gdb 1
184for details.
185.Em NOTE:
186not available on all architectures.
187.It Cd makeoptions DEBUG="-g"
188The -g flag causes
189.Pa netbsd.gdb
190to be built in addition to
191.Pa netbsd .
192.Pa netbsd.gdb
193is useful for debugging kernel crash dumps with gdb.
194The command
195.Dl gdb -k
196invokes gdb in kernel debugger mode.
197See
198.Xr gdb 1
199for details. This also turns on
200.Em options DEBUG
201(which see).
202.It Cd options DEBUG
203Turns on miscellaneous kernel debugging. Since options are turned into
204preprocessor defines (see above),
205.Em options DEBUG
206is equivalent to doing a
207.Em #define DEBUG
208throughout the kernel. Much of the kernel has
209.Em #ifdef DEBUG
210conditionalized debugging code. Note that many parts of the kernel
211(typically device drivers) include their own
212.Em #ifdef XXX_DEBUG
213conditionals instead.
214.It Cd options DIAGNOSTIC
215Adds code to the kernel that does internal consistency checks.  This
216code will cause the kernel to panic if corruption of internal data
217structures is detected.
218.It Cd options KTRACE
219Add hooks for the system call tracing facility, which allows users to
220watch the system call invokation behavior of processes. See
221.Xr ktrace 1
222for details.
223.El
224.Ss File Systems
225.Bl -ohang
226.It Cd options FFS
227Includes code implementing the Berkeley Fast File System
228.Em ( FFS ) .
229Most machines need this if they are not running diskless.
230.It Cd options LFS
231Include the log structured file system
232.Em ( LFS ) .
233See
234.Xr mount_lfs 8
235and
236.Xr newlfs 8
237for details.
238.It Cd options MFS
239Include the memory file system
240.Em ( MFS ) .
241This file system stores files in swappable memory, and produces
242notable performance improvements when it is used as the file store
243for
244.Pa /tmp
245and similar file systems. See
246.Xr mount_mfs 8
247for details.
248.It Cd options NFSCLIENT
249.It Cd options NFSSERVER
250Include code implementing the client and server sides of the
251.Em NFS
252(Network File System) remote file sharing protocol,
253respectively. Although the bulk of the code implementing
254.Em NFS
255is kernel based, several user level daemons are needed for it to
256work. See
257.Xr mount_nfs 8 ,
258.Xr mountd 8 ,
259.Xr nfsd 8 ,
260and
261.Xr nfsiod 8
262for details.
263.It Cd options CD9660
264Includes code for the ISO 9660 + Rock Ridge file system, which is the
265standard file system on many CD-ROMs. Useful mostly if you have a CD
266drive. See
267.Xr mount_cd9660 8
268for details.
269.It Cd options MSDOSFS
270Includes the
271.Tn MS-DOS
272FAT file system, which is reportedly still used
273by unfortunate people who have not heard about
274.Nx .
275Also implements the
276.Tn Windows 95
277extensions to the same, which permit the use of longer, mixed case
278file names. see
279.Xr mount_msdos 8
280and
281.Xr fsck_msdos 8
282for details.
283.It Cd options FDESC
284Includes code for a file system, conventionally mounted on
285.Pa /dev/fd ,
286which permits access to the per-process file descriptor space via
287special files in the file system.
288See
289.Xr mount_fdesc 8
290for details.
291Note that this facility is redundant, and thus unneeded on most
292.Nx
293systems, since the
294.Xr fd 4
295pseudodevice driver already provides identical functionality. On most
296.Nx
297systems, instances of
298.Xr fd 4
299are mknoded under
300.Pa /dev/fd/
301and on
302.Pa /dev/stdin ,
303.Pa /dev/stdout ,
304and
305.Pa /dev/stderr .
306.It Cd options KERNFS
307Includes code which permits the mounting of a special file system
308(normally mounted on
309.Pa /kern )
310in which files representing various kernel variables and parameters
311may be found.
312See
313.Xr mount_kernfs 8
314for details.
315.It Cd options NULLFS
316Includes code for a loopback file system. This permits portions of the file
317hierarchy to be re-mounted in other places. The code really exists to
318provide an example of a stackable file system layer. See
319.Xr mount_null 8
320for details.
321.It Cd options PORTAL
322Includes the (experimental) portal filesystem. This permits
323interesting tricks like opening TCP sockets by opening files in the
324file system. The portal file system is conventionally mounted on
325.Pa /p
326and is partially implemented by a special daemon. See
327.Xr mount_portal 8
328for details.
329.It Cd options PROCFS
330Includes code for a special file system (conventionally mounted on
331.Pa /proc )
332in which the process space becomes visible in the file system. Among
333other things, the memory spaces of processes running on the system are
334visible as files, and signals may be sent to processes by writing to
335.Pa ctl
336files in the procfs namespace. See
337.Xr mount_procfs 8
338for details.
339.It Cd options UMAPFS
340Includes a loopback file system in which user and group ids may be
341remapped -- this can be useful when mounting alien file systems with
342different uids and gids than the local system.
343See
344.Xr mount_umap 8
345for details.
346.It Cd options UNION
347Includes code for the union file system, which permits directories to
348be mounted on top of each other in such a way that both file systems
349remain visible -- this permits tricks like allowing writing (and the
350deleting of files) on a read-only file system like a CD-ROM by
351mounting a local writable file system on top of the read-only file
352system. See
353.Xr mount_union 8
354for details.
355.El
356.Ss File System Options
357.Bl -ohang
358.It Cd options QUOTA
359Enables kernel support for file system quotas. See
360.Xr quotaon 8 ,
361.Xr edquota 8 ,
362and
363.Xr quota 1
364for details. Note that quotas only work on
365.Dq ffs
366file systems, although
367.Xr rpc.rquotad 8
368permits them to be accessed over
369.Em NFS .
370.It Cd options FIFO
371Augments the system to permit the use of
372.At V
373style FIFOs (i.e.
374.Dq named pipes
375). This option is recommended.
376.El
377.Ss Miscellaneous Options
378.Bl -ohang
379.It Cd options GENERIC
380Indicates, on some ports, that code permitting booting and mounting
381root on any file system should be included.  This option also allows
382the
383.Dq swap generic
384configuration file option to find the location of the swap file at
385boot time rather than having a compiled in default.  Largely obsolete
386though still in use on some architectures.  Most ports now include the
387necessary code regardless of this option.  On a port that still cares
388about
389.Em options GENERIC ,
390it should be omitted ONLY in very special cases, such as
391a
392.Em RAMDISK
393installation kernel.
394.It Cd options LKM
395Enable loadable kernel modules. See
396.Xr lkm 4
397for details.
398.Em NOTE:
399not available on all architectures.
400.It Cd options INSECURE
401Hardwires the kernel security level at -1. This means that the system
402always runs in secure level 0 mode, even when running multiuser. See
403the manual page for
404.Xr init 8
405for details on the implications of this. The kernel secure level may
406manipulated by the superuser by altering the
407.Em kern.securelevel
408sysctl variable. (It should be noted that the secure level may only be
409lowered by a call from process id 1, i.e.
410.Em init . )
411See also
412.Xr sysctl 8
413and
414.Xr sysctl 3 .
415.It Cd options UCONSOLE
416Normally, only the superuser can execute the TIOCCONS ioctl, which
417redirects console output to a non-console tty. (See
418.Xr tty 4
419for details).
420This option permits any user to execute the ioctl. This is useful on
421machines such as personal workstations which run X servers, where one
422would prefer to permit console output to be viewed in a window without
423requiring a suid root program to do it.
424.It Cd options MACHINE_NONCONTIG
425This option changes part of the VM/pmap interface, to allow for
426non-contiguous memory.  On some ports it is not an option.  These
427ports typically only use one of the interfaces.
428.It Cd options NTP
429Turns on in-kernel precision timekeeping support used by software
430implementing
431.Em NTP
432(Network Time Protocol, RFC1305).
433The
434.Em NTP
435option adds an in-kernel phase-locked loop (PLL) for normal
436.Em NTP
437operation, and a frequency-locked loop (FLL) for intermittently-connected
438operation.
439.Xr xntpd 8
440will employ a user-level PLL when kernel support is unavailable,
441but the in-kernel version has lower latency and more precision, and
442so typically keeps much better time.
443The interface to the kernel
444.Em NTP
445support is provided by the
446.Xr ntp_adjtime 2
447and
448.Xr ntp_gettime 2
449system calls, which are intended for use by
450.Xr xntpd 8
451and are enabled by the option.
452On systems with sub-microsecond resolution timers, or where (HZ / 100000)
453is not an integer, the
454.Em NTP
455option also enables extended-precision arithmetic to keep track of
456fractional clock ticks at NTP time-format precision.
457.It Cd options PPS
458This option enables a kernel serial line discipline for receiving time
459phase signals from an external reference clock such as a radio clock.
460(The
461.Em NTP
462option (which see) must be on if the
463.Em PPS
464option is used.)
465Some reference clocks generate a pulse per second (PPS) signal in
466phase with their time source. The
467.Em PPS
468line discipline receives this signal on either the data leads
469or the DCD control lead of a serial port.
470.Em NTP
471uses the PPS signal to discipline the local clock oscillator to a high
472degree of precision (typically less than 50 microseconds in time and
4730.1 ppm in accuracy).
474.Em PPS
475can also generate a serial output pulse when the system receives a PPS
476interrupt.  This can be used to measure the system interrupt latency
477and thus calibrate
478.Em NTP
479to account for it.
480Using
481.Em PPS
482usually requires a
483gadget box
484to convert from TTL to RS-232 signal levels.
485The gadget box and PPS are described in more detail in the HTML documentation
486shipped with the xntpd distribution.
487.It Cd option SETUIDSCRIPTS
488Allows scripts with the setuid bit set to execute as the effective
489user rather than the real user, just like binary executables.
490NOTE: Using this option will also enable
491.Em option FDSCRIPTS
492.It Cd option FDSCRIPTS
493Allows execution of scripts with the execute bit set, but not the
494read bit, by opening the file and passing the file descriptor to
495the shell, rather than the filename.  NOTE: Execute only (non-readable)
496scripts will have
497.Va argv[0]
498set to
499.Pa /dev/fd/* .
500What this option allows as far as security is
501concerned, is the ability to safely ensure that the correct script
502it run by the interpreter, as it is passed as an already open file.
503.It Cd options TIMEZONE=integer
504The kernel (and typically the hardware battery backed-up clock on
505those machines that have one) keeps time in
506.Em UTC
507(Universal Coordinated Time, once known as
508.Em GMT ,
509or Greenwich Mean Time)
510and not in the time of the local time zone.
511The
512.Em TIMEZONE
513option is used on some ports (such as the i386) to tell the kernel
514that the hardware clock is offset from
515.Em UTC
516by the specified number of minutes. This is typically used when a
517machine boots several operating systems and one of them wants the
518hardware clock to run in the local time zone and not in
519.Em UTC ,
520e.g.
521.Em TIMEZONE=300
522means
523the hardware clock is running US Eastern Time (300 minutes behind
524.Em UTC ) ,
525and not
526.Em UTC .
527.Bd -filled -offset indent
528.Em HISTORICAL NOTE:
529The
530.Em TIMEZONE
531option at one time was used to set the kernel's idea of what time zone
532the system was operating in -- this information was returned by
533.Xr gettimeofday 2 .
534Time zone information is now managed by user space software based
535on the contents of the
536.Pa /etc/localtime
537file or the
538.Ev TZ
539environment variable.
540(See
541.Xr zic 8 ,
542.Xr tzfile 5 ,
543and
544.Xr tzset 3
545for details).
546This usage of the
547.Em TIMEZONE
548option is now obsolete.
549.Ed
550.It Cd options DST=[0|1]
551On some ports (such as the i386) that permit offsetting the system's
552hardware real time clock with the
553.Em TIMEZONE
554option
555(see
556.Em TIMEZONE
557above) the
558.Em DST
559option being set to one indicates that the hardware clock real time
560clock is set for
561.Dq daylight savings time ,
562and that because of this 60
563minutes should be subtracted from the
564.Em TIMEZONE
565value (60 minutes being the standard DST correction.) The effect of
566this on such ports is thus identical to simply subtracting 60 from the
567value of
568.Em TIMEZONE ,
569and the use of the option is thus purely aesthetic in nature.
570.Bd -filled -offset indent
571.Em HISTORICAL NOTE:
572Long ago,
573.Dq daylight savings time
574computations were made in the kernel and not in user space.
575The
576.Em DST
577option was used at that time to set the kernel's idea of whether DST
578information should be returned by
579.Xr gettimeofday 2 .
580As with
581.Em TIMEZONE
582(which see), the moving of timezone handling from the kernel to user
583space libraries has obsoleted the old usage of this option.
584.Ed
585.El
586.Ss Networking Options
587.Bl -ohang
588.It Cd options GATEWAY
589Enables
590.Em IPFORWARDING
591(which see)
592and (on most ports) increases the size of
593.Em NMBCLUSTERS
594(which see). In general,
595.Em GATEWAY
596is used to indicate that a system should act as a router, and
597.Em IPFORWARDING
598is not invoked directly.
599(Note that
600.Em GATEWAY
601has no impact on protocols other than IP, such as CLNP or XNS.)
602.It Cd options IPFORWARDING
603Enables IP routing behavior. With this option enabled, the machine
604will forward IP datagrams between its interfaces that are destined for
605other machines. Note that even without this option, the kernel will
606still forward some packets (such as source routed packets) -- removing
607.Em GATEWAY
608and
609.Em IPFORWARDING
610is insufficient to stop all routing through a bastion host on a
611firewall -- source routing is controlled independently.
612To turn off source routing, use
613.Em options IPFORWSRCRT=0
614(which see).
615Note that IP forwarding may be turned on and off independently of the
616setting of the
617.Em IPFORWARDING
618option through the use of the
619.Em net.inet.ip.forwarding
620sysctl variable. If
621.Em net.inet.ip.forwarding
622is 1, IP forwarding is on. See
623.Xr sysctl 8
624and
625.Xr sysctl 3
626for details.
627.It Cd options IPFORWSRCRT=value
628If
629.Em value
630is set to zero, source routing of IP datagrams is turned off. If
631.Em value
632is set to one (the default) or the option is absent, source routed IP
633datagrams are forwarded by the machine.  Note that source routing of
634IP packets may be turned on and off independently of the setting of
635the
636.Em IPFORWSRCRT
637option through the use of the
638.Em net.inet.ip.forwsrcrt
639sysctl variable. If
640.Em net.inet.ip.forwsrcrt
641is 1, forwarding of source routed IP datagrams is on. See
642.Xr sysctl 8
643and
644.Xr sysctl 3
645for details.
646.It Cd options INET
647Includes support for the TCP/IP protocol stack. You almost certainly
648want this. See
649.Xr inet 4
650for details.
651This option is currently required.
652.It Cd options NS
653Include support for the Xerox XNS protocol stack. See
654.Xr ns 4
655for details.
656.It Cd options ISO,TPIP
657Include support for the ubiquitous OSI protocol stack. See
658.Xr iso 4
659for details.
660.It Cd options EON
661Include support for OSI tunneling over IP.
662.It Cd options CCITT,LLC,HDLC
663Include support for the X.25 protocol stack.
664The state of this code is currently unknown, and probably contains
665bugs.
666.It Cd options IPNOPRIVPORTS
667Normally, only root can bind a socket descriptor to a so-called
668.Dq privileged
669TCP
670port, that is, a port number in the range 0-1023.  This option
671eliminates those checks from the kernel. This can be useful if there
672is a desire to allow daemons without privileges to bind those ports,
673e.g. on firewalls. The security tradeoffs in doing this are subtle.
674This option should only be used by experts.
675.It Cd options TCP_COMPAT_42
676TCP bug compatibility with 4.2BSD.  In 4.2BSD, TCP sequence numbers
677were 32-bit signed values.  Modern implementations of TCP use unsigned
678values.  This option clamps the initial sequence number to start in
679the range 2^31 rather than the full unsigned range of 2^32.  Also,
680under 4.2BSD, keepalive packets must contain at least one byte or else
681the remote end would not respond.
682.It Cd options PFIL_HOOKS
683This option turns on the packet filter interface hooks.  See
684.Xr pfil 9
685for details.
686.El
687.Ss System V IPC Options
688.Bl -ohang
689.It Cd options SYSVMSG
690Includes support for
691.At V
692style message queues.  See
693.Xr msgctl 2 ,
694.Xr msgget 2 ,
695.Xr msgrcv 2 ,
696.Xr msgsnd 2 .
697.It Cd options SYSVSEM
698Includes support for
699.At V
700style semaphores. See
701.Xr semctl 2 ,
702.Xr semget 2 ,
703.Xr semop 2 .
704.It Cd options SYSVSHM
705Includes support for
706.At V
707style shared memory.  See
708.Xr shmat 2 ,
709.Xr shmctl 2 ,
710.Xr shmdt 2 ,
711.Xr shmget 2 .
712.It Cd options SHMPAXPGS=value
713Sets the maximum number of
714.At V
715style shared memory pages that are available through the
716.Xr shmget 2
717system call. Default value is 1024 on most ports. See
718.Pa /usr/include/machine/vmparam.h
719for the default.
720.El
721.Ss VM Related Options
722.Bl -ohang
723.It Cd options SWAPPAGER
724Turns on paging.  (To be specific, this enables the virtual memory
725module responsible for handling page faults for
726.Dq anonymous
727objects (i.e. BSS pages)).
728.Em MANDATORY
729-- you cannot actually run without
730this
731.Dq option .
732.It Cd options VNODEPAGER
733Support for mmap()ing of files. (Specifically, this enables the
734virtual memory module responsible for handling page faults on mapped
735files (
736.Dq plain file
737vnodes)).
738.Em MANDATORY
739-- you cannot actually run without
740this
741.Dq option .
742.It Cd options DEVPAGER
743Support for mmap()ing of devices.  (Specifically, this enables the
744virtual memory module responsible for handling page faults on mapped
745devices (
746.Dq cdev
747vnodes)).
748.Em MANDATORY
749-- you cannot actually run without
750this
751.Dq option .
752.It Cd options NMBCLUSTERS=value
753Size of kernel mbuf cluster map,
754.Em mb_map ,
755in CLBYTES-sized logical
756pages.  Default on most ports is 256 (512 with
757.Dq options GATEWAY ).
758See
759.Pa /usr/include/machine/param.h
760for exact default information.  Increase this value if you get
761.Dq mb_map full
762messages.
763.It Cd options NKMEMCLUSTERS=value
764Size of kernel malloc arena in CLBYTES-sized logical pages.  This area
765is covered by the kernel submap
766.Em kmem_map .
767See
768.Pa /usr/include/machine/param.h
769for the default value, which is port specific.  Increase this value if
770you get
771.Dq out of space in kmem_map
772panics.
773.\" , which mean you have run out of mallocable kernel memory.
774.It Cd options NBUF=value
775.It Cd options BUFPAGES=value
776These option set the number of pages available for the buffer cache.
777Their default value is a machine depedant value, often calculated as
778between 5% and 10% of total available RAM.
779.It Cd options NKPDE=value
780.Em [ NOTE :
781This option is i386 specific.]
782The i386 architecture uses a two-level page table; page directories
783contain entries for page tables, which contain entries for pages.
784The value of NKPDE indicates how many page tables (page directory entries)
785to reserve for use by the kernel.  This option should
786not be necessary, but the kernel cannot currently initialize this value at
787boot time and the default of 12 page directory entries is not large enough
788for the kernel if a very large buffer cache is used, either by default on
789machines with large memories or by modifying the value of BUFPAGES.  This
790limitation could be removed by changing NKPDE from a preprocessor symbol
791to a kernel global variable (nkpde) and modifying locore.s to compute nkpde
792from the values of the kernel global variables physmem and bufpages
793(as defined or computed) at boot time.
794.El
795.\" The following requests should be uncommented and used where appropriate.
796.\" .Sh FILES
797.\" .Sh EXAMPLES
798.Sh SEE ALSO
799.Xr config 8 ,
800.Xr init 8 ,
801.Xr gettimeofday 2 ,
802.Xr tzset 3 ,
803.Xr zic 8 ,
804.Xr tzfile 5 ,
805.Xr sysctl 8 ,
806.Xr sysctl 3 ,
807.Xr xntpd 8 ,
808.Xr ntp_adjtime 2 ,
809.Xr ntp_gettime 2 ,
810.Xr i386_iopl 2 ,
811.Xr msgctl 2 ,
812.Xr msgget 2 ,
813.Xr msgrcv 2 ,
814.Xr msgsnd 2 ,
815.Xr semctl 2 ,
816.Xr semget 2 ,
817.Xr semop 2 ,
818.Xr shmat 2 ,
819.Xr shmctl 2 ,
820.Xr shmdt 2 ,
821.Xr shmget 2 ,
822.Xr ddb 4 ,
823.Xr lkm 4 ,
824.Xr inet 4 ,
825.Xr ns 4 ,
826.Xr iso 4 ,
827.Xr mount_lfs 8 ,
828.Xr newlfs 8 ,
829.Xr mount_mfs 8 ,
830.Xr mount_nfs 8 ,
831.Xr mount_cd9660 8 ,
832.Xr mount_msdos 8 ,
833.Xr mount_fdesc 8 ,
834.Xr mount_kernfs 8 ,
835.Xr mount_null 8 ,
836.Xr mount_portal 8 ,
837.Xr mount_procfs 8 ,
838.Xr mount_umap 8 ,
839.Xr mount_union 8 ,
840.Xr edquota 8 ,
841.Xr quotaon 8 ,
842.Xr quota 1 ,
843.Xr rpc.rquotad 8 ,
844.Xr ktrace 1 ,
845.Xr gdb 1
846.Sh HISTORY
847The
848.Nm
849man page first appeared in
850.Nx 1.3 .
851.Sh BUGS
852The
853.Em INET
854and the
855.Em VNODEPAGER
856options should not be required.
857