Changes to try fix sched_ule.c courtesy of David Xu.
This commit is contained in:
parent
2df2fdd630
commit
948c671f4a
@ -1325,7 +1325,8 @@ sched_user_prio(struct thread *td, u_char prio)
|
|||||||
u_char oldprio;
|
u_char oldprio;
|
||||||
|
|
||||||
td->td_base_user_pri = prio;
|
td->td_base_user_pri = prio;
|
||||||
|
if (td->td_flags & TDF_UBORROWING && td->td_user_pri <= prio)
|
||||||
|
return;
|
||||||
oldprio = td->td_user_pri;
|
oldprio = td->td_user_pri;
|
||||||
td->td_user_pri = prio;
|
td->td_user_pri = prio;
|
||||||
|
|
||||||
@ -1582,24 +1583,24 @@ sched_class(struct thread *td, int class)
|
|||||||
* Return some of the child's priority and interactivity to the parent.
|
* Return some of the child's priority and interactivity to the parent.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
sched_exit(struct proc *p, struct thread *childtd)
|
sched_exit(struct proc *p, struct thread *child)
|
||||||
{
|
{
|
||||||
struct thread *parent = FIRST_THREAD_IN_PROC(p);
|
|
||||||
mtx_assert(&sched_lock, MA_OWNED);
|
|
||||||
|
|
||||||
CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
|
CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
|
||||||
childtd, childtd->td_proc->p_comm, childtd->td_priority);
|
child, child->td_proc->p_comm, child->td_priority);
|
||||||
|
|
||||||
/* parent->td_sched->skg_slptime += childtd->td_sched->skg_slptime; */
|
sched_exit_thread(FIRST_THREAD_IN_PROC(p), child);
|
||||||
parent->td_sched->skg_runtime += childtd->td_sched->skg_runtime;
|
|
||||||
sched_interact_update(parent);
|
|
||||||
|
|
||||||
tdq_load_rem(TDQ_CPU(childtd->td_sched->ts_cpu), childtd->td_sched);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sched_exit_thread(struct thread *td, struct thread *childtd)
|
sched_exit_thread(struct thread *td, struct thread *child)
|
||||||
{
|
{
|
||||||
|
CTR3(KTR_SCHED, "sched_exit_thread: %p(%s) prio %d",
|
||||||
|
child, childproc->p_comm, child->td_priority);
|
||||||
|
|
||||||
|
td->td_sched->skg_runtime += child->td_sched->skg_runtime;
|
||||||
|
sched_interact_update(td);
|
||||||
|
tdq_load_rem(TDQ_CPU(child->td_sched->ts_cpu), child->td_sched);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user