Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_param.c
| Show All 35 Lines | |||||
| #include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
| #include "opt_param.h" | #include "opt_param.h" | ||||
| #include "opt_msgbuf.h" | #include "opt_msgbuf.h" | ||||
| #include "opt_maxphys.h" | #include "opt_maxphys.h" | ||||
| #include "opt_maxusers.h" | #include "opt_maxusers.h" | ||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/_maxphys.h> | |||||
| #include <sys/systm.h> | #include <sys/systm.h> | ||||
| #include <sys/buf.h> | #include <sys/buf.h> | ||||
| #include <sys/kernel.h> | #include <sys/kernel.h> | ||||
| #include <sys/limits.h> | #include <sys/limits.h> | ||||
| #include <sys/msgbuf.h> | #include <sys/msgbuf.h> | ||||
| #include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
| #include <sys/proc.h> | #include <sys/proc.h> | ||||
| #include <sys/vnode.h> | #include <sys/vnode.h> | ||||
| Show All 24 Lines | |||||
| #define MAXFILES (40 + 32 * maxusers) | #define MAXFILES (40 + 32 * maxusers) | ||||
| #endif | #endif | ||||
| static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); | static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); | ||||
| int hz; /* system clock's frequency */ | int hz; /* system clock's frequency */ | ||||
| int tick; /* usec per tick (1000000 / hz) */ | int tick; /* usec per tick (1000000 / hz) */ | ||||
| time_t tick_seconds_max; /* max hz * seconds an integer can hold */ | time_t tick_seconds_max; /* max hz * seconds an integer can hold */ | ||||
| struct bintime tick_bt; /* bintime per tick (1s / hz) */ | struct bintime tick_bt; /* bintime per tick (1s / hz) */ | ||||
kib: To avoid copy/paste, you could move this fragment into a new header sys/_maxphys.h, then… | |||||
| sbintime_t tick_sbt; | sbintime_t tick_sbt; | ||||
| int maxusers; /* base tunable */ | int maxusers; /* base tunable */ | ||||
| int maxproc; /* maximum # of processes */ | int maxproc; /* maximum # of processes */ | ||||
| int maxprocperuid; /* max # of procs per user */ | int maxprocperuid; /* max # of procs per user */ | ||||
| int maxfiles; /* sys. wide open files limit */ | int maxfiles; /* sys. wide open files limit */ | ||||
| int maxfilesperproc; /* per-proc open files limit */ | int maxfilesperproc; /* per-proc open files limit */ | ||||
| int msgbufsize; /* size of kernel message buffer */ | int msgbufsize; /* size of kernel message buffer */ | ||||
| int nbuf; /* number of bcache bufs */ | int nbuf; /* number of bcache bufs */ | ||||
| ▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines | |||||
To avoid copy/paste, you could move this fragment into a new header sys/_maxphys.h, then include it from subr_param.h and sys/param.h for !_KERNEL.