PERFORCE change 104656 for review

Chris Jones cdjones at FreeBSD.org
Mon Aug 21 07:13:28 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104656

Change 104656 by cdjones at cdjones-impulse on 2006/08/21 07:13:08

	Clear out cruft, support new jail_set_resource_limits syscall.

Affected files ...

.. //depot/projects/soc2006/cdjones_jail/src/sys/sys/jail.h#19 edit

Differences ...

==== //depot/projects/soc2006/cdjones_jail/src/sys/sys/jail.h#19 (text+ko) ====

@@ -18,8 +18,8 @@
 	char		*path;
 	char		*hostname;
 	u_int32_t	ip_number;
-	unsigned int	sched_shares;
-        unsigned int    mem_limit;
+	unsigned int    sched_shares;
+	unsigned int    mem_limit;
 };
 
 struct xprison {
@@ -35,16 +35,8 @@
 };
 #define	XPRISON_VERSION	2
 
-#define JAIL_DEFAULT_PRIORITY 10
-#define JAIL_MINIMUM_PRIORITY 1
-#define JAIL_MAXIMUM_PRIORITY 100
+#define JAIL_MINIMUM_SHARES 1
 
-#define JAIL_DEFAULT_MEM_LIMIT 256 * 1024 * 1024
-
-#define J_SCHED_TD_ACTIVE 0x01
-#define J_SCHED_TD_DIE    0x02
-#define J_SCHED_TD_DEAD   0x04
-
 #define J_PAGER_TD_ACTIVE 0x01
 #define J_PAGER_TD_DIE    0x02
 #define J_PAGER_TD_DEAD   0x04
@@ -53,6 +45,7 @@
 
 int jail(struct jail *);
 int jail_attach(int);
+int jail_set_resource_limits(unsigned int, int, int);
 
 #else /* _KERNEL */
 
@@ -98,7 +91,7 @@
 	int		 pr_securelevel;		/* (p) securelevel */
 	struct task	 pr_task;			/* (d) destroy task */
 	struct mtx	 pr_mtx;
-	u_int32_t	 pr_sched_shares;		/* (p) jail priority */
+	u_int32_t        pr_sched_shares;		/* (p) jail priority */
 	u_int		 pr_estcpu;			/* (p) est. cpu of jail */
         struct proc     *pr_pager;                      /* (c) pager pid */
         int             *pr_pager_flags_ptr;            /* (p) communication to pager */


More information about the p4-projects mailing list