From 304a5ae6cb96fedc36fcdc0bdd5692f13581a397 Mon Sep 17 00:00:00 2001 From: gnn Date: Wed, 26 Aug 2015 16:36:41 +0000 Subject: Summary: Add the interactivity equations to the header comment for our interactivity calculation routine. Suggested by: rwatson --- sys/kern/sched_ule.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/kern') diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 708478f..25c827a 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1450,6 +1450,21 @@ sched_initticks(void *dummy) * a [0, 100] integer. This is the voluntary sleep time of a process, which * differs from the cpu usage because it does not account for time spent * waiting on a run-queue. Would be prettier if we had floating point. + * + * When a thread's sleep time is greater than its run time the + * calculation is: + * + * scaling factor + * interactivity score = --------------------- + * sleep time / run time + * + * + * When a thread's run time is greater than its sleep time the + * calculation is: + * + * scaling factor + * interactivity score = --------------------- + scaling factor + * run time / sleep time */ static int sched_interact_score(struct thread *td) -- cgit v1.1