--- sched_4bsd.c~ Sun Jun 15 16:57:17 2003 +++ sched_4bsd.c Sun Aug 10 08:41:06 2003 @@ -448,7 +448,8 @@ ke->ke_sched->ske_cpticks++; kg->kg_estcpu = ESTCPULIM(kg->kg_estcpu + 1); - if ((kg->kg_estcpu % INVERSE_ESTCPU_WEIGHT) == 0) { + if (((kg->kg_estcpu + 1) % INVERSE_ESTCPU_WEIGHT) == 0) { + curthread->td_flags |= TDF_NEEDRESCHED; resetpriority(kg); if (td->td_priority >= PUSER) td->td_priority = kg->kg_user_pri;