FreeBSD/sys/kern/sched_ule.c
/*
 * Scale back the interactivity history when a child thread is created.  The
 * history is inherited from the parent but the thread may behave totally
 * differently.  For example, a shell spawning a compiler process.  We want
 * to learn that the compiler is behaving badly very quickly.
 */
Scale back the interactivity history when a child thread is created.  The
history is inherited from the parent but the thread may behave totally
differently.  For example, a shell spawning a compiler process.  We want
to learn that the compiler is behaving badly very quickly.
Scale back the interactivity history when a child thread is created . The history is inherited from the parent but the thread may behave totally differently . For example a shell spawning a compiler process . We want to learn that the compiler is behaving badly very quickly .
static void
sched_interact_fork(struct thread *td)
{
	struct td_sched *ts;
	int ratio;
	int sum;
	ts = td_get_sched(td);
	sum = ts->ts_runtime + ts->ts_slptime;
	if (sum > SCHED_SLP_RUN_FORK) {
		ratio = sum / SCHED_SLP_RUN_FORK;
		ts->ts_runtime /= ratio;
		ts->ts_slptime /= ratio;
	}
}
static void sched_interact_fork ( struct thread * td ) { struct td_sched * ts ; int ratio ; int sum ; ts = td_get_sched ( td ) ; sum = ts -> ts_runtime + ts -> ts_slptime ; if ( sum > SCHED_SLP_RUN_FORK ) { ratio = sum / SCHED_SLP_RUN_FORK ; ts -> ts_runtime /= ratio ; ts -> ts_slptime /= ratio ; } }
Scale back the interactivity history when a child thread is created.
Scale back the interactivity history when a child thread is created .