From owner-p4-projects@FreeBSD.ORG Mon Aug 21 07:13:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8953F16A4E5; Mon, 21 Aug 2006 07:13:28 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62D7316A4DD for ; Mon, 21 Aug 2006 07:13:28 +0000 (UTC) (envelope-from cdjones@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3075E43D8E for ; Mon, 21 Aug 2006 07:13:28 +0000 (GMT) (envelope-from cdjones@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7L7DSp8036294 for ; Mon, 21 Aug 2006 07:13:28 GMT (envelope-from cdjones@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7L7DRgs036291 for perforce@freebsd.org; Mon, 21 Aug 2006 07:13:27 GMT (envelope-from cdjones@FreeBSD.org) Date: Mon, 21 Aug 2006 07:13:27 GMT Message-Id: <200608210713.k7L7DRgs036291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cdjones@FreeBSD.org using -f From: Chris Jones To: Perforce Change Reviews Cc: Subject: PERFORCE change 104656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 07:13:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=104656 Change 104656 by cdjones@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 */