Date: Fri, 10 Mar 2006 14:07:39 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 93109 for review Message-ID: <200603101407.k2AE7d87002700@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=93109 Change 93109 by jhb@jhb_slimer on 2006/03/10 14:06:37 Do the kdb check earlier in mi_switch() to avoid doublecounting rux_runtime. Affected files ... .. //depot/projects/smpng/sys/kern/kern_synch.c#99 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_synch.c#99 (text+ko) ==== @@ -355,6 +355,16 @@ ("mi_switch: switch must be voluntary or involuntary")); KASSERT(newtd != curthread, ("mi_switch: preempting back to ourself")); + /* + * Don't perform context switches from the debugger. + */ + if (kdb_active) { + mtx_unlock_spin(&sched_lock); + kdb_backtrace(); + kdb_reenter(); + panic("%s: did not reenter debugger", __func__); + } + if (flags & SW_VOL) p->p_stats->p_ru.ru_nvcsw++; else @@ -376,16 +386,6 @@ td->td_generation++; /* bump preempt-detect counter */ /* - * Don't perform context switches from the debugger. - */ - if (kdb_active) { - mtx_unlock_spin(&sched_lock); - kdb_backtrace(); - kdb_reenter(); - panic("%s: did not reenter debugger", __func__); - } - - /* * Check if the process exceeds its cpu resource allocation. If * it reaches the max, arrange to kill the process in ast(). */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603101407.k2AE7d87002700>