mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Ingo Molnar'" <mingo@elte.hu>,
	"'Nick Piggin'" <nickpiggin@yahoo.com.au>,
	"'Andrew Morton'" <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [patch] optimize activate_task()
Date: Wed, 26 Oct 2005 18:53:05 -0700	[thread overview]
Message-ID: <200510270153.j9R1r5g27370@unix-os.sc.intel.com> (raw)

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


             reply	other threads:[~2005-10-27  1:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27  1:53 Chen, Kenneth W [this message]
2005-10-28  8:38 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200510270153.j9R1r5g27370@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®