PERFORCE change 103110 for review
Chris Jones
cdjones at FreeBSD.org
Thu Aug 3 09:55:33 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103110
Change 103110 by cdjones at cdjones-impulse on 2006/08/03 09:55:12
Same as before; panics with WITNESS. Whee.
Affected files ...
.. //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_jail.c#20 edit
Differences ...
==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_jail.c#20 (text+ko) ====
@@ -144,8 +144,6 @@
if (flags & J_PAGER_TD_DIE)
break;
- mtx_lock(&pr->pr_mtx);
-
/* TODO: consider whether it might be better to start
* pushing back when we approach the limit, rather than
* when we hit it.
@@ -220,7 +218,6 @@
} /* end LIST_FOREACH procs */
sx_sunlock(&allproc_lock);
}
- mtx_unlock(&pr->pr_mtx);
/* TODO --- make interval into a sysctl. */
/* 6 seconds because VM recomputes totals every 5. */
@@ -432,16 +429,14 @@
mtx_lock(&pr->pr_mtx);
pr->pr_ref--;
if (pr->pr_ref == 0) {
- *pr->pr_scheduler_flags_ptr = J_SCHED_TD_DIE;
- kthread_resume(pr->pr_scheduler);
- *pr->pr_pager_flags_ptr = J_PAGER_TD_DIE;
- kthread_resume(pr->pr_pager);
-
LIST_REMOVE(pr, pr_list);
mtx_unlock(&pr->pr_mtx);
prisoncount--;
mtx_unlock(&allprison_mtx);
+ /* Tell scheduler, pager to die. No need to wait. */
+ *pr->pr_scheduler_flags_ptr = J_SCHED_TD_DIE;
+ *pr->pr_pager_flags_ptr = J_PAGER_TD_DIE;
wakeup(pr);
TASK_INIT(&pr->pr_task, 0, prison_complete, pr);
More information about the p4-projects
mailing list