diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-02 19:00:27 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-02 19:00:27 -0400 |
commit | 2f030cd48bbdfc6f4155c38684d0e8b98195f4f5 (patch) | |
tree | 2d67fe40b43f2a05940b8c37375e83bfd42ef602 /kernel | |
parent | c55e411400c13bcfc774d541fc1c9f0f62b644c4 (diff) |
LITMUS: rework job migration code
The old version had a significant window for races with
interrupt handlers executing on other CPUs.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 00097dea89..170237e3a4 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3649,9 +3649,10 @@ need_resched_nonpreemptible: | |||
3649 | /* do litmus scheduling outside of rq lock, so that we | 3649 | /* do litmus scheduling outside of rq lock, so that we |
3650 | * can do proper migrations for global schedulers | 3650 | * can do proper migrations for global schedulers |
3651 | */ | 3651 | */ |
3652 | litmus_schedule(rq, prev); | 3652 | |
3653 | spin_lock(&rq->lock); | 3653 | spin_lock(&rq->lock); |
3654 | clear_tsk_need_resched(prev); | 3654 | clear_tsk_need_resched(prev); |
3655 | litmus_schedule(rq, prev); | ||
3655 | 3656 | ||
3656 | if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { | 3657 | if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { |
3657 | if (unlikely((prev->state & TASK_INTERRUPTIBLE) && | 3658 | if (unlikely((prev->state & TASK_INTERRUPTIBLE) && |