Date: Wed, 16 Aug 2006 05:29:27 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 104180 for review Message-ID: <200608160529.k7G5TRoC020509@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104180 Change 104180 by cdjones@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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608160529.k7G5TRoC020509>