Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_rctl.c
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits"); | SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits"); | ||||
SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN, | SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN, | ||||
&rctl_maxbufsize, 0, "Maximum output buffer size"); | &rctl_maxbufsize, 0, "Maximum output buffer size"); | ||||
SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit, CTLFLAG_RW, | SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit, CTLFLAG_RW, | ||||
&rctl_log_rate_limit, 0, "Maximum number of log messages per second"); | &rctl_log_rate_limit, 0, "Maximum number of log messages per second"); | ||||
SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, devctl_rate_limit, CTLFLAG_RWTUN, | SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, devctl_rate_limit, CTLFLAG_RWTUN, | ||||
&rctl_devctl_rate_limit, 0, "Maximum number of devctl messages per second"); | &rctl_devctl_rate_limit, 0, "Maximum number of devctl messages per second"); | ||||
SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_min, | SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_min, | ||||
CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_min_sysctl, "IU", | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | ||||
0, 0, &rctl_throttle_min_sysctl, "IU", | |||||
"Shortest throttling duration, in hz"); | "Shortest throttling duration, in hz"); | ||||
TUNABLE_INT("kern.racct.rctl.throttle_min", &rctl_throttle_min); | TUNABLE_INT("kern.racct.rctl.throttle_min", &rctl_throttle_min); | ||||
SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_max, | SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_max, | ||||
CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_max_sysctl, "IU", | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | ||||
0, 0, &rctl_throttle_max_sysctl, "IU", | |||||
"Longest throttling duration, in hz"); | "Longest throttling duration, in hz"); | ||||
TUNABLE_INT("kern.racct.rctl.throttle_max", &rctl_throttle_max); | TUNABLE_INT("kern.racct.rctl.throttle_max", &rctl_throttle_max); | ||||
SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct, | SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct, | ||||
CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct_sysctl, "IU", | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | ||||
0, 0, &rctl_throttle_pct_sysctl, "IU", | |||||
"Throttling penalty for process consumption, in percent"); | "Throttling penalty for process consumption, in percent"); | ||||
TUNABLE_INT("kern.racct.rctl.throttle_pct", &rctl_throttle_pct); | TUNABLE_INT("kern.racct.rctl.throttle_pct", &rctl_throttle_pct); | ||||
SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct2, | SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct2, | ||||
CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct2_sysctl, "IU", | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | ||||
0, 0, &rctl_throttle_pct2_sysctl, "IU", | |||||
"Throttling penalty for container consumption, in percent"); | "Throttling penalty for container consumption, in percent"); | ||||
TUNABLE_INT("kern.racct.rctl.throttle_pct2", &rctl_throttle_pct2); | TUNABLE_INT("kern.racct.rctl.throttle_pct2", &rctl_throttle_pct2); | ||||
/* | /* | ||||
* 'rctl_rule_link' connects a rule with every racct it's related to. | * 'rctl_rule_link' connects a rule with every racct it's related to. | ||||
* For example, rule 'user:X:openfiles:deny=N/process' is linked | * For example, rule 'user:X:openfiles:deny=N/process' is linked | ||||
* with uidinfo for user X, and to each process of that user. | * with uidinfo for user X, and to each process of that user. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,111 Lines • Show Last 20 Lines |