[PATCH] sched: account rt_tasks as iso_ticks

From: Con Kolivas
Date: Fri Jan 21 2005 - 17:48:40 EST



SCHED_ISO tasks should have their cpu accounting be a proportion of ticks that would normally be available for SCHED_NORMAL tasks.

Add ticks consumed by rt_tasks to the iso_ticks variable and comments.

Signed-off-by: Con Kolivas <kernel@xxxxxxxxxxx> Index: linux-2.6.11-rc1-mm2/kernel/sched.c
===================================================================
--- linux-2.6.11-rc1-mm2.orig/kernel/sched.c 2005-01-22 09:36:27.000000000 +1100
+++ linux-2.6.11-rc1-mm2/kernel/sched.c 2005-01-22 09:36:49.000000000 +1100
@@ -2499,7 +2499,13 @@ void scheduler_tick(void)
task_t *p = current;

rq->timestamp_last_tick = sched_clock();
- if (iso_task(p) && !rq->iso_refractory)
+ /*
+ * The iso_ticks accounting is incremented only when a SCHED_ISO task
+ * is running in soft rt mode. Running rt_tasks are also accounted
+ * to make the iso_cpu a proportion of cpu available for SCHED_NORMAL
+ * tasks only.
+ */
+ if (rt_task(p) || (iso_task(p) && !rq->iso_refractory))
inc_iso_ticks(rq, p);
else
dec_iso_ticks(rq, p);

Attachment: signature.asc
Description: OpenPGP digital signature