subr_param.c (204278) | subr_param.c (204420) |
---|---|
1/*- 2 * Copyright (c) 1980, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)param.c 8.3 (Berkeley) 8/20/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1980, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)param.c 8.3 (Berkeley) 8/20/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/subr_param.c 204278 2010-02-24 15:52:18Z brooks $"); | 38__FBSDID("$FreeBSD: head/sys/kern/subr_param.c 204420 2010-02-27 18:00:57Z alc $"); |
39 40#include "opt_param.h" 41#include "opt_maxusers.h" 42 43#include <sys/limits.h> 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kernel.h> --- 22 unchanged lines hidden (view full) --- 69#define NPROC (20 + 16 * maxusers) 70#ifndef NBUF 71#define NBUF 0 72#endif 73#ifndef MAXFILES 74#define MAXFILES (maxproc * 2) 75#endif 76 | 39 40#include "opt_param.h" 41#include "opt_maxusers.h" 42 43#include <sys/limits.h> 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kernel.h> --- 22 unchanged lines hidden (view full) --- 69#define NPROC (20 + 16 * maxusers) 70#ifndef NBUF 71#define NBUF 0 72#endif 73#ifndef MAXFILES 74#define MAXFILES (maxproc * 2) 75#endif 76 |
77/* Values of enum VM_GUEST members are used as indices in 78 * vm_guest_sysctl_names */ 79enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; 80 | |
81static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); 82 83int hz; 84int tick; 85int maxusers; /* base tunable */ 86int maxproc; /* maximum # of processes */ 87int maxprocperuid; /* max # of procs per user */ 88int maxfiles; /* sys. wide open files limit */ --- 43 unchanged lines hidden (view full) --- 132 133/* 134 * These have to be allocated somewhere; allocating 135 * them here forces loader errors if this file is omitted 136 * (if they've been externed everywhere else; hah!). 137 */ 138struct buf *swbuf; 139 | 77static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); 78 79int hz; 80int tick; 81int maxusers; /* base tunable */ 82int maxproc; /* maximum # of processes */ 83int maxprocperuid; /* max # of procs per user */ 84int maxfiles; /* sys. wide open files limit */ --- 43 unchanged lines hidden (view full) --- 128 129/* 130 * These have to be allocated somewhere; allocating 131 * them here forces loader errors if this file is omitted 132 * (if they've been externed everywhere else; hah!). 133 */ 134struct buf *swbuf; 135 |
136/* 137 * The elements of this array are ordered based upon the values of the 138 * corresponding enum VM_GUEST members. 139 */ |
|
140static const char *const vm_guest_sysctl_names[] = { 141 "none", 142 "generic", 143 "xen", 144 NULL 145}; 146 147#ifndef XEN --- 168 unchanged lines hidden --- | 140static const char *const vm_guest_sysctl_names[] = { 141 "none", 142 "generic", 143 "xen", 144 NULL 145}; 146 147#ifndef XEN --- 168 unchanged lines hidden --- |