PERFORCE change 181430 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Jul 24 14:43:19 UTC 2010
http://p4web.freebsd.org/@@181430?ac=10
Change 181430 by trasz at trasz_victim on 2010/07/24 14:43:16
Fix CPU time accounting.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_container.c#19 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_container.c#19 (text+ko) ====
@@ -73,6 +73,7 @@
{
switch (resource) {
+ case RUSAGE_CPU:
case RUSAGE_NPROC:
return (0);
default:
@@ -382,6 +383,9 @@
KASSERT(amount >= 0, ("rusage_set: invalid amount for resource %d: %ju",
resource, amount));
diff = amount - p->p_container.c_resources[resource];
+ KASSERT(diff >= 0 || container_resource_reclaimable(resource),
+ ("rusage_set: usage of non-reclaimable resource %d dropping",
+ resource));
#ifdef HRL
if (diff > 0) {
error = hrl_enforce_proc(p, resource, diff);
More information about the p4-projects
mailing list