diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index c24dd5ac918b..3840ec51f080 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -73,6 +73,9 @@ options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 8aca4116ea75..8e20d6004d11 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -65,6 +65,9 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options VFP # Floating-point support +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits device virtio device virtio_mmio diff --git a/sys/conf/options b/sys/conf/options index d7b937d90b2a..eabd73c0e69f 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -931,7 +931,7 @@ IPOIB_CM opt_ofed.h # Resource Accounting RACCT opt_global.h -RACCT_DISABLED opt_global.h +RACCT_DEFAULT_TO_DISABLED opt_global.h # Resource Limits RCTL opt_global.h diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index b1740f32efc2..26d87d121b88 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -73,6 +73,9 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 5cee140cc1e0..e8ae9fef7646 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -70,7 +70,7 @@ FEATURE(racct, "Resource Accounting"); * Do not block processes that have their %cpu usage <= pcpu_threshold. */ static int pcpu_threshold = 1; -#ifdef RACCT_DISABLED +#ifdef RACCT_DEFAULT_TO_DISABLED int racct_enable = 0; #else int racct_enable = 1; diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC index 2312658b8916..b826adb14933 100644 --- a/sys/pc98/conf/GENERIC +++ b/sys/pc98/conf/GENERIC @@ -71,6 +71,9 @@ options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index b5bf850263c2..4172d532dc96 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -77,6 +77,9 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC index 5685185e5b2d..f602eeb712d3 100644 --- a/sys/sparc64/conf/GENERIC +++ b/sys/sparc64/conf/GENERIC @@ -67,6 +67,9 @@ options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/usr.bin/rctl/rctl.8 b/usr.bin/rctl/rctl.8 index 3f72b9122171..fe147562b7d0 100644 --- a/usr.bin/rctl/rctl.8 +++ b/usr.bin/rctl/rctl.8 @@ -233,6 +233,18 @@ for a list of supported signals Not all actions are supported for all resources. Attempting to add a rule with an action not supported by a given resource will result in error. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt, or +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va kern.racct.enable: No 1 +Enable +.Nm . +This defaults to 1, unless +.Cd "options RACCT_DEFAULT_TO_DISABLED" +is set in the kernel configuration file. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES