From owner-p4-projects@FreeBSD.ORG Thu Aug 17 09:01:03 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 6BE6516A4E5; Thu, 17 Aug 2006 09:01:03 +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 448AE16A4DE for ; Thu, 17 Aug 2006 09:01:03 +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 1542D43D55 for ; Thu, 17 Aug 2006 09:01:03 +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 k7H912Qn015790 for ; Thu, 17 Aug 2006 09:01:02 GMT (envelope-from cdjones@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7H912oa015787 for perforce@freebsd.org; Thu, 17 Aug 2006 09:01:02 GMT (envelope-from cdjones@FreeBSD.org) Date: Thu, 17 Aug 2006 09:01:02 GMT Message-Id: <200608170901.k7H912oa015787@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 104371 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: Thu, 17 Aug 2006 09:01:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=104371 Change 104371 by cdjones@cdjones_meanook on 2006/08/17 09:00:53 Add sysctl to permit tweaking the number of cpu shares that non-jailed processes, erm, share. Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#14 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#14 (text+ko) ==== @@ -295,6 +295,11 @@ &sched_kgfollowons, 0, "number of followons done in a ksegrp"); +static int sched_unjailedProcessShares = 50; +SYSCTL_INT(_kern_sched, OID_AUTO, unjailedprocessshares, CTLFLAG_RW, + &sched_unjailedProcessShares, 0, + "number of shares to allocate to unjailed processes"); + static __inline void sched_load_add(void) { @@ -586,7 +591,7 @@ * when jail CPU shares are added / changed, rather than * doing it every second. */ - nShares = 0; + nShares = sched_unjailedProcessShares; nCpu = 0; LIST_FOREACH(pr, &allprison, pr_list) { nShares += pr->pr_sched_shares;