From: tip-bot for Yong Zhang <yong.zhang0@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, rusty@rustcorp.com.au,
yong.zhang0@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:sched/core] sched: Change usage of rt_rq->rt_se to rt_rq->tg->rt_se[cpu]
Date: Thu, 4 Feb 2010 09:56:10 GMT [thread overview]
Message-ID: <tip-74b7eb5885415ed41d012f432398d1b697115b5f@git.kernel.org> (raw)
In-Reply-To: <2674af741001282257r28c97a92o9f90cf16fe8d3d84@mail.gmail.com>
Commit-ID: 74b7eb5885415ed41d012f432398d1b697115b5f
Gitweb: http://git.kernel.org/tip/74b7eb5885415ed41d012f432398d1b697115b5f
Author: Yong Zhang <yong.zhang0@gmail.com>
AuthorDate: Fri, 29 Jan 2010 14:57:52 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 4 Feb 2010 09:57:32 +0100
sched: Change usage of rt_rq->rt_se to rt_rq->tg->rt_se[cpu]
This is the first step to remove rt_rq member rt_se because it have the
same meaning with tg->rt_se[cpu]. And the latter style is also used by
the fair scheduling class.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <2674af741001282257r28c97a92o9f90cf16fe8d3d84@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched_rt.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index ca49ceb..bf3e38f 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -199,8 +199,11 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se);
static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
{
+ int this_cpu = smp_processor_id();
struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
- struct sched_rt_entity *rt_se = rt_rq->rt_se;
+ struct sched_rt_entity *rt_se;
+
+ rt_se = rt_rq->tg->rt_se[this_cpu];
if (rt_rq->rt_nr_running) {
if (rt_se && !on_rt_rq(rt_se))
@@ -212,7 +215,10 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
{
- struct sched_rt_entity *rt_se = rt_rq->rt_se;
+ int this_cpu = smp_processor_id();
+ struct sched_rt_entity *rt_se;
+
+ rt_se = rt_rq->tg->rt_se[this_cpu];
if (rt_se && on_rt_rq(rt_se))
dequeue_rt_entity(rt_se);
prev parent reply other threads:[~2010-02-04 9:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 6:57 [RFC PATCH 1/2] sched: change " Yong Zhang
2010-02-04 9:56 ` tip-bot for Yong Zhang [this message]
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=tip-74b7eb5885415ed41d012f432398d1b697115b5f@git.kernel.org \
--to=yong.zhang0@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/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®