diff options
| author | David S. Miller <davem@davemloft.net> | 2008-03-17 23:44:31 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-03-17 23:44:31 -0700 |
| commit | 2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch) | |
| tree | 9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /kernel/sched_rt.c | |
| parent | 5e226e4d9016daee170699f8a4188a5505021756 (diff) | |
| parent | bde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/sched_rt.c')
| -rw-r--r-- | kernel/sched_rt.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index f54792b175b2..0a6d2e516420 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -393,8 +393,6 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) */ for_each_sched_rt_entity(rt_se) enqueue_rt_entity(rt_se); - - inc_cpu_load(rq, p->se.load.weight); } static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) @@ -414,8 +412,6 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) if (rt_rq && rt_rq->rt_nr_running) enqueue_rt_entity(rt_se); } - - dec_cpu_load(rq, p->se.load.weight); } /* @@ -1111,9 +1107,11 @@ static void prio_changed_rt(struct rq *rq, struct task_struct *p, pull_rt_task(rq); /* * If there's a higher priority task waiting to run - * then reschedule. + * then reschedule. Note, the above pull_rt_task + * can release the rq lock and p could migrate. + * Only reschedule if p is still on the same runqueue. */ - if (p->prio > rq->rt.highest_prio) + if (p->prio > rq->rt.highest_prio && rq->curr == p) resched_task(p); #else /* For UP simply resched on drop of prio */ |
