From owner-p4-projects@FreeBSD.ORG Mon Aug 14 08:28: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 27A2F16A4DE; Mon, 14 Aug 2006 08:28: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 DDB0816A4DA for ; Mon, 14 Aug 2006 08:28:27 +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 A8C2343D45 for ; Mon, 14 Aug 2006 08:28:27 +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 k7E8SRQm043595 for ; Mon, 14 Aug 2006 08:28:27 GMT (envelope-from cdjones@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7E8SRkU043592 for perforce@freebsd.org; Mon, 14 Aug 2006 08:28:27 GMT (envelope-from cdjones@FreeBSD.org) Date: Mon, 14 Aug 2006 08:28:27 GMT Message-Id: <200608140828.k7E8SRkU043592@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 103815 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, 14 Aug 2006 08:28:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=103815 Change 103815 by cdjones@cdjones-impulse on 2006/08/14 08:28:02 Add support for SCHED_HIER (experimental CPU-limiting for jails, patched from 4BSD). Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_switch.c#6 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_switch.c#6 (text+ko) ==== @@ -105,7 +105,7 @@ #if defined(SMP) && (defined(__i386__) || defined(__amd64__)) #include #endif -#if defined(SMP) && defined(SCHED_4BSD) +#if defined(SMP) && (defined(SCHED_4BSD) || defined(SCHED_HIER)) #include #endif @@ -234,7 +234,7 @@ } } -#ifdef SCHED_4BSD +#if (defined(SCHED_4BSD) || defined(SCHED_HIER)) /* * Remove a thread from its KSEGRP's run queue. * This in turn may remove it from a KSE if it was already assigned @@ -856,7 +856,7 @@ return (0); } -#if defined(SMP) && defined(SCHED_4BSD) +#if defined(SMP) && (defined(SCHED_4BSD) || defined(SCHED_HIER)) int runq_fuzz = 1; SYSCTL_INT(_kern_sched, OID_AUTO, runq_fuzz, CTLFLAG_RW, &runq_fuzz, 0, ""); #endif @@ -874,7 +874,7 @@ mtx_assert(&sched_lock, MA_OWNED); while ((pri = runq_findbit(rq)) != -1) { rqh = &rq->rq_queues[pri]; -#if defined(SMP) && defined(SCHED_4BSD) +#if defined(SMP) && (defined(SCHED_4BSD) || defined(SCHED_HIER)) /* fuzz == 1 is normal.. 0 or less are ignored */ if (runq_fuzz > 1) { /*