
From: Con Kolivas <kernel@kolivas.org>

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@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/sched.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -puN kernel/sched.c~sched-account-rt_tasks-as-iso_ticks kernel/sched.c
--- 25/kernel/sched.c~sched-account-rt_tasks-as-iso_ticks	2005-01-23 19:15:15.349332144 -0800
+++ 25-akpm/kernel/sched.c	2005-01-23 19:15:35.856214624 -0800
@@ -2452,7 +2452,13 @@ void scheduler_tick(void)
 
 	rq->timestamp_last_tick = now;
 
-	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);
_
