Date: Mon, 14 Aug 2006 08:28:27 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103815 for review Message-ID: <200608140828.k7E8SRkU043592@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/smp.h> #endif -#if defined(SMP) && defined(SCHED_4BSD) +#if defined(SMP) && (defined(SCHED_4BSD) || defined(SCHED_HIER)) #include <sys/sysctl.h> #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) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608140828.k7E8SRkU043592>