Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91097
b: refs/heads/master
c: 58d6c2d
h: refs/heads/master
i:
  91095: 8677438
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 19, 2008
1 parent 0c264bb commit 2eb2d93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d19ca30874f2ad343d054e0b5c0576744afeecd4
refs/heads/master: 58d6c2d72f8628f39e8689fbde8aa177fcf00a37
1 change: 1 addition & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ struct sched_rt_entity {
unsigned long timeout;
int nr_cpus_allowed;

struct sched_rt_entity *back;
#ifdef CONFIG_RT_GROUP_SCHED
struct sched_rt_entity *parent;
/* rq on which this entity is (to be) queued: */
Expand Down
27 changes: 11 additions & 16 deletions trunk/kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,26 +479,21 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se)
/*
* Because the prio of an upper entry depends on the lower
* entries, we must remove entries top - down.
*
* XXX: O(1/2 h^2) because we can only walk up, not down the chain.
*/
static void dequeue_rt_stack(struct task_struct *p)
{
struct sched_rt_entity *rt_se, *top_se;
struct sched_rt_entity *rt_se, *back = NULL;

/*
* dequeue all, top - down.
*/
do {
rt_se = &p->rt;
top_se = NULL;
for_each_sched_rt_entity(rt_se) {
if (on_rt_rq(rt_se))
top_se = rt_se;
}
if (top_se)
dequeue_rt_entity(top_se);
} while (top_se);
rt_se = &p->rt;
for_each_sched_rt_entity(rt_se) {
rt_se->back = back;
back = rt_se;
}

for (rt_se = back; rt_se; rt_se = rt_se->back) {
if (on_rt_rq(rt_se))
dequeue_rt_entity(rt_se);
}
}

/*
Expand Down

0 comments on commit 2eb2d93

Please sign in to comment.