Date: Tue, 14 Sep 2004 08:15:06 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61481 for review Message-ID: <200409140815.i8E8F6Uu008500@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61481 Change 61481 by julian@julian_ref on 2004/09/14 08:14:20 try be more rigorous about counting threads in run queue etc. Affected files ... .. //depot/projects/nsched/sys/kern/kern_switch.c#26 edit .. //depot/projects/nsched/sys/kern/sched_4bsd.c#53 edit .. //depot/projects/nsched/sys/kern/sched_ule.c#33 edit Differences ... ==== //depot/projects/nsched/sys/kern/kern_switch.c#26 (text+ko) ==== @@ -389,7 +389,6 @@ } kg->kg_avail_opennings = 1; } - kg->kg_avail_opennings--; sched_add(td, flags); return; } @@ -450,7 +449,6 @@ td2 = TAILQ_NEXT(tda, td_runq); kg->kg_last_assigned = td2; } - kg->kg_avail_opennings--; sched_add(td2, flags); } else { CTR3(KTR_RUNQ, "setrunqueue: held: td%p kg%p pid%d", ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#53 (text+ko) ==== @@ -1024,6 +1024,7 @@ } if ((td->td_proc->p_flag & P_NOLOAD) == 0) sched_tdcnt++; + td->td_ksegrp->kg_avail_opennings--; runq_add(ke->ke_runq, ke); ke->ke_ksegrp->kg_runq_kses++; ke->ke_state = KES_ONRUNQ; ==== //depot/projects/nsched/sys/kern/sched_ule.c#33 (text+ko) ==== @@ -1773,6 +1773,7 @@ curthread->td_flags |= TDF_NEEDRESCHED; if (preemptive && maybe_preempt(td)) return; + td->td_ksegrp->kg_avail_opennings--; ke->ke_ksegrp->kg_runq_threads++; ke->ke_state = KES_ONRUNQ;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409140815.i8E8F6Uu008500>