PERFORCE change 188571 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Feb 5 19:31:04 UTC 2011
http://p4web.freebsd.org/@@188571?ac=10
Change 188571 by trasz at trasz_victim on 2011/02/05 19:30:11
Improve comments.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/sys/rctl.h#11 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/sys/rctl.h#11 (text+ko) ====
@@ -51,21 +51,18 @@
#ifdef _KERNEL
/*
- * 'rctl_rule' describes a single limit configured by the system
- * administrator or a temporary limit set using setrlimit(2).
- * The difference between 'subject' and 'per' is best described
- * by example: to specify that every process of user with uid 1984
- * can consume 1gb of virtual memory, the 'rr_subject_type' would be
- * RCTL_SUBJECT_TYPE_USER, 'rctl_subject.rs_uip' would point to
- * 'struct uidinfo' for uid 1984, and 'rr_per' would be equal
- * RCTL_SUBJECT_TYPE_PROCESS.
+ * Rules describe an action to be taken when conditions defined
+ * in the rule are met. There is no global list of rules; instead,
+ * rules are linked to by the container structures for all the subjects
+ * they apply to - for example, a rule of type "user" is linked to the
+ * appropriate struct uidinfo, and to all the processes of that user.
*
* 'rr_refcount' is equal to the number of rctl_rule_link structures
* pointing to the rule.
*
* This structure must never change after being added, via rctl_rule_link
- * structures, to subjects. In order to change a limit, add a new
- * rule and remove the previous one.
+ * structures, to subjects. In order to change a rule, add a new rule
+ * and remove the previous one.
*/
struct rctl_rule {
int rr_subject_type;
@@ -83,6 +80,9 @@
struct task rr_task;
};
+/*
+ * Allowed values for rr_subject_type and rr_per fields.
+ */
#define RCTL_SUBJECT_TYPE_UNDEFINED -1
#define RCTL_SUBJECT_TYPE_PROCESS 0x0000
#define RCTL_SUBJECT_TYPE_USER 0x0001
@@ -91,9 +91,8 @@
#define RCTL_SUBJECT_TYPE_MAX RCTL_SUBJECT_TYPE_JAIL
/*
- * 'rr_per' takes the same flags as 'rr_subject_type'.
+ * Allowed values for rr_action field.
*/
-
#define RCTL_ACTION_UNDEFINED -1
#define RCTL_ACTION_SIGHUP SIGHUP
#define RCTL_ACTION_SIGINT SIGINT
More information about the p4-projects
mailing list