From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: <nickpiggin@yahoo.com.au>, "'Ingo Molnar'" <mingo@elte.hu>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [patch] sched: optimize activate_task for RT task - v2
Date: Tue, 14 Nov 2006 15:55:10 -0800 [thread overview]
Message-ID: <000401c70848$520252e0$d834030a@amr.corp.intel.com> (raw)
Perhaps the following is a better patch compare to earlier one.
The p->sleep_type are only for SCHED_NORMAL as well, so we can
bypass them altogether in one shot.
RT task does not participate in interactiveness priority and thus
shouldn't be bothered with timestamp and p->sleep_type manipulation
when task is being put on run queue. Bypass all of the them with
a single if (rt_task) test.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
--- ./kernel/sched.c.orig 2006-11-14 13:29:37.000000000 -0800
+++ ./kernel/sched.c 2006-11-14 14:05:39.000000000 -0800
@@ -938,6 +938,9 @@ static void activate_task(struct task_st
{
unsigned long long now;
+ if (rt_task(p))
+ goto out;
+
now = sched_clock();
#ifdef CONFIG_SMP
if (!local) {
@@ -947,9 +950,7 @@ static void activate_task(struct task_st
+ rq->timestamp_last_tick;
}
#endif
-
- if (!rt_task(p))
- p->prio = recalc_task_prio(p, now);
+ p->prio = recalc_task_prio(p, now);
/*
* This checks to make sure it's not an uninterruptible task
@@ -974,7 +975,7 @@ static void activate_task(struct task_st
}
}
p->timestamp = now;
-
+out:
__activate_task(p, rq);
}
next reply other threads:[~2006-11-14 23:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-14 23:55 Chen, Kenneth W [this message]
2006-11-15 7:00 ` [patch] sched: optimize activate_task for RT task - v2 Mike Galbraith
2006-11-15 8:24 ` Mike Galbraith
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='000401c70848$520252e0$d834030a@amr.corp.intel.com' \
--to=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=suresh.b.siddha@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).