Skip to content

Commit

Permalink
sched: Change usage of rt_rq->rt_se to rt_rq->tg->rt_se[cpu]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yong Zhang authored and Ingo Molnar committed Feb 4, 2010
1 parent 4a461c8 commit 74b7eb5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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);
Expand Down

0 comments on commit 74b7eb5

Please sign in to comment.