Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/racct.h
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Resource usage can drop, as opposed to only grow. | * Resource usage can drop, as opposed to only grow. | ||||
*/ | */ | ||||
#define RACCT_CAN_DROP(X) (RACCT_IS_RECLAIMABLE(X) | RACCT_IS_DECAYING(X)) | #define RACCT_CAN_DROP(X) (RACCT_IS_RECLAIMABLE(X) | RACCT_IS_DECAYING(X)) | ||||
/* | /* | ||||
* The 'racct' structure defines resource consumption for a particular | * The 'racct' structure defines resource consumption for a particular | ||||
* subject, such as process or jail. | * subject, such as process or jail. | ||||
markj: s/current/total/, I think. Or perhaps "accumulated". | |||||
* | * | ||||
* This structure must be filled with zeroes initially. | * This structure must be filled with zeroes initially. | ||||
*/ | */ | ||||
struct racct { | struct racct { | ||||
int64_t r_resources[RACCT_MAX + 1]; | int64_t r_resources[RACCT_MAX + 1]; | ||||
LIST_HEAD(, rctl_rule_link) r_rule_links; | LIST_HEAD(, rctl_rule_link) r_rule_links; | ||||
uint64_t r_runtime; | |||||
uint64_t r_time; | |||||
Not Done Inline ActionsIt would be worthwhile to add a few sentences to the comment above explaining these fields. markj: It would be worthwhile to add a few sentences to the comment above explaining these fields. | |||||
}; | }; | ||||
SYSCTL_DECL(_kern_racct); | SYSCTL_DECL(_kern_racct); | ||||
#ifdef RACCT | #ifdef RACCT | ||||
extern struct mtx racct_lock; | extern struct mtx racct_lock; | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |
s/current/total/, I think. Or perhaps "accumulated".