]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] optimize activate_task()
authorChen, Kenneth W <kenneth.w.chen@intel.com>
Wed, 9 Nov 2005 23:45:29 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 10 Nov 2005 00:07:44 +0000 (16:07 -0800)
recalc_task_prio() is called from activate_task() to calculate dynamic
priority and interactive credit for the activating task.  For real-time
scheduling process, all that dynamic calculation is thrown away at the end
because rt priority is fixed.  Patch to optimize recalc_task_prio() away
for rt processes.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <piggin@cyberone.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index ac3f5cc3bb51f725bbf5b8eae5db83516a3c9dee..b6506671b2be08c8da0a5582800d3ec0fffc7280 100644 (file)
@@ -815,7 +815,8 @@ static void activate_task(task_t *p, runqueue_t *rq, int local)
        }
 #endif
 
-       p->prio = recalc_task_prio(p, now);
+       if (!rt_task(p))
+               p->prio = recalc_task_prio(p, now);
 
        /*
         * This checks to make sure it's not an uninterruptible task