diff options
author | trasz <trasz@FreeBSD.org> | 2011-03-29 17:47:25 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2011-03-29 17:47:25 +0000 |
commit | b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f (patch) | |
tree | 304753d7f5287660a242996801bd5664ee945d3a /sys/sys/resourcevar.h | |
parent | 056d03857b74836195225ca4b0216f0d197477b7 (diff) | |
download | FreeBSD-src-b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f.zip FreeBSD-src-b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f.tar.gz |
Add racct. It's an API to keep per-process, per-jail, per-loginclass
and per-loginclass resource accounting information, to be used by the new
resource limits code. It's connected to the build, but the code that
actually calls the new functions will come later.
Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)
Diffstat (limited to 'sys/sys/resourcevar.h')
-rw-r--r-- | sys/sys/resourcevar.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 67af9b6..f17d95f 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -79,6 +79,8 @@ struct plimit { int pl_refcnt; /* number of references */ }; +struct racct; + /*- * Per uid resource consumption. This structure is used to track * the total resource consumption (process count, socket buffer size, @@ -99,6 +101,7 @@ struct uidinfo { long ui_ptscnt; /* (b) number of pseudo-terminals */ uid_t ui_uid; /* (a) uid */ u_int ui_ref; /* (b) reference count */ + struct racct *ui_racct; /* (a) resource accounting */ }; #define UIDINFO_VMSIZE_LOCK(ui) mtx_lock(&((ui)->ui_vmsize_mtx)) @@ -140,6 +143,8 @@ struct uidinfo void uifree(struct uidinfo *uip); void uihashinit(void); void uihold(struct uidinfo *uip); +void ui_racct_foreach(void (*callback)(struct racct *racct, + void *arg2, void *arg3), void *arg2, void *arg3); #endif /* _KERNEL */ #endif /* !_SYS_RESOURCEVAR_H_ */ |