Convert racct_enable to bool and annotate as __read_frequently
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
ea1fbe943e
commit
84ecf3e3b9
@ -74,13 +74,13 @@ FEATURE(racct, "Resource Accounting");
|
||||
*/
|
||||
static int pcpu_threshold = 1;
|
||||
#ifdef RACCT_DEFAULT_TO_DISABLED
|
||||
int racct_enable = 0;
|
||||
bool __read_frequently racct_enable = false;
|
||||
#else
|
||||
int racct_enable = 1;
|
||||
bool __read_frequently racct_enable = true;
|
||||
#endif
|
||||
|
||||
SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting");
|
||||
SYSCTL_UINT(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable,
|
||||
SYSCTL_BOOL(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable,
|
||||
0, "Enable RACCT/RCTL");
|
||||
SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold,
|
||||
0, "Processes with higher %cpu usage than this value can be throttled.");
|
||||
|
@ -91,7 +91,7 @@ struct ucred;
|
||||
#define RACCT_DECAYING 0x20
|
||||
|
||||
extern int racct_types[];
|
||||
extern int racct_enable;
|
||||
extern bool racct_enable;
|
||||
|
||||
#define ASSERT_RACCT_ENABLED() KASSERT(racct_enable, \
|
||||
("%s called with !racct_enable", __func__))
|
||||
|
Loading…
Reference in New Issue
Block a user