PERFORCE change 104180 for review
Chris Jones
cdjones at FreeBSD.org
Wed Aug 16 05:29:28 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104180
Change 104180 by cdjones at cdjones-impulse on 2006/08/16 05:28:54
Fix silly error in total sched share calculation, add some debugging.
Affected files ...
.. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#9 edit
Differences ...
==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#9 (text+ko) ====
@@ -557,9 +557,12 @@
* when jail CPU shares are added / changed, rather than
* doing it every second.
*/
+ nShares = 0;
LIST_FOREACH(pr, &allprison, pr_list) {
+ printf("schedcpu_thread: prison %p\n", &pr);
nShares += pr->pr_sched_shares;
}
+ printf("schedcpu_thread: %d CPU shares total\n", nShares);
total_jail_sched_shares = nShares;
schedcpu();
@@ -613,7 +616,10 @@
* soft limits available. Also, the amount of CPU time
* reserved to unjailed processes really should be sysctl'd.
*/
+ printf("resetpriority: reset KSE %p priority\n", &kg);
newpriority *= pr->pr_sched_shares;
+ KASSERT(0 != total_jail_sched_shares,
+ "no jail sched shares when a jail exists?!");
newpriority /= 2*total_jail_sched_shares;
}
newpriority = min(max(newpriority, PRI_MIN_TIMESHARE),
More information about the p4-projects
mailing list