mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] optimize activate_task()
@ 2005-10-27  1:53 Chen, Kenneth W
  2005-10-28  8:38 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Chen, Kenneth W @ 2005-10-27  1:53 UTC (permalink / raw)
  To: 'Ingo Molnar', 'Nick Piggin', 'Andrew Morton'
  Cc: linux-kernel

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>


--- ./kernel/sched.c.orig	2005-10-26 10:39:40.594015398 -0700
+++ ./kernel/sched.c	2005-10-26 18:43:12.187410006 -0700
@@ -833,7 +833,8 @@ static void activate_task(task_t *p, run
 	}
 #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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] optimize activate_task()
  2005-10-27  1:53 [patch] optimize activate_task() Chen, Kenneth W
@ 2005-10-28  8:38 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2005-10-28  8:38 UTC (permalink / raw)
  To: Chen, Kenneth W
  Cc: 'Nick Piggin', 'Andrew Morton', linux-kernel


* Chen, Kenneth W <kenneth.w.chen@intel.com> wrote:

> 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>

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-28  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27  1:53 [patch] optimize activate_task() Chen, Kenneth W
2005-10-28  8:38 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®