FreeBSD/sys/kern/sched_ule.c
/*
 * Penalize another thread for the time spent on this one.  This helps to
 * worsen the priority and interactivity of processes which schedule batch
 * jobs such as make.  This has little effect on the make process itself but
 * causes new processes spawned by it to receive worse scores immediately.
 */
Penalize another thread for the time spent on this one.  This helps to
worsen the priority and interactivity of processes which schedule batch
jobs such as make.  This has little effect on the make process itself but
causes new processes spawned by it to receive worse scores immediately.
Penalize another thread for the time spent on this one . This helps to worsen the priority and interactivity of processes which schedule batch jobs such as make . This has little effect on the make process itself but causes new processes spawned by it to receive worse scores immediately .
void
sched_exit_thread(struct thread *td, struct thread *child)
{
	KTR_STATE1(KTR_SCHED, "thread", sched_tdname(child), "thread exit",
	    "prio:%d", child->td_priority);
	thread_lock(td);
	td_get_sched(td)->ts_runtime += td_get_sched(child)->ts_runtime;
	sched_interact_update(td);
	sched_priority(td);
	thread_unlock(td);
}
void sched_exit_thread ( struct thread * td , struct thread * child ) { KTR_STATE1 ( KTR_SCHED , " " , sched_tdname ( child ) , " " , " " , child -> td_priority ) ; thread_lock ( td ) ; td_get_sched ( td ) -> ts_runtime += td_get_sched ( child ) -> ts_runtime ; sched_interact_update ( td ) ; sched_priority ( td ) ; thread_unlock ( td ) ; }
Penalize another thread for the time spent on this one.
Penalize another thread for the time spent on this one .
/*
	 * Give the child's runtime to the parent without returning the
	 * sleep time as a penalty to the parent.  This causes shells that
	 * launch expensive things to mark their children as expensive.
	 */