--- sched_ule.c.orig Fri Feb 13 05:24:48 2004 +++ sched_ule.c Fri Feb 13 05:38:17 2004 @@ -186,7 +186,7 @@ #define SCHED_INTERACTIVE(kg) \ (sched_interact_score(kg) < SCHED_INTERACT_THRESH) #define SCHED_CURR(kg, ke) \ - (ke->ke_thread->td_priority != kg->kg_user_pri || \ + (ke->ke_thread->td_priority < kg->kg_user_pri || \ SCHED_INTERACTIVE(kg)) /* @@ -1169,8 +1169,17 @@ if (td->td_proc->p_flag & P_SA) { kseq_load_rem(KSEQ_CPU(ke->ke_cpu), ke); setrunqueue(td); - } else + } else { + struct ksegrp *kg; + + kg = ke->ke_ksegrp; + if (kg->kg_pri_base == PRI_TIMESHARE && + !SCHED_CURR(kg, ke)) + /* XXX - is the choice of kseq right? */ + ke->ke_runq = + KSEQ_CPU(ke->ke_cpu)->ksq_next; kseq_runq_add(KSEQ_SELF(), ke); + } } else { if (ke->ke_runq) { kseq_load_rem(KSEQ_CPU(ke->ke_cpu), ke);