Date: Thu, 3 Aug 2006 09:55:32 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103110 for review Message-ID: <200608030955.k739tWgQ007054@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103110 Change 103110 by cdjones@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608030955.k739tWgQ007054>