PERFORCE change 104371 for review
Chris Jones
cdjones at FreeBSD.org
Thu Aug 17 09:01:03 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104371
Change 104371 by cdjones at 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;
More information about the p4-projects
mailing list