Commit c700d531 authored by Ingo Molnar's avatar Ingo Molnar

- get rid of rq->frozen, fix context switch races.

parent 3150c862
...@@ -135,7 +135,6 @@ struct prio_array { ...@@ -135,7 +135,6 @@ struct prio_array {
*/ */
struct runqueue { struct runqueue {
spinlock_t lock; spinlock_t lock;
spinlock_t frozen;
unsigned long nr_running, nr_switches, expired_timestamp; unsigned long nr_running, nr_switches, expired_timestamp;
signed long nr_uninterruptible; signed long nr_uninterruptible;
task_t *curr, *idle; task_t *curr, *idle;
...@@ -403,7 +402,7 @@ void sched_exit(task_t * p) ...@@ -403,7 +402,7 @@ void sched_exit(task_t * p)
#if CONFIG_SMP || CONFIG_PREEMPT #if CONFIG_SMP || CONFIG_PREEMPT
asmlinkage void schedule_tail(void) asmlinkage void schedule_tail(void)
{ {
spin_unlock_irq(&this_rq()->frozen); spin_unlock_irq(&this_rq()->lock);
} }
#endif #endif
...@@ -828,9 +827,6 @@ asmlinkage void schedule(void) ...@@ -828,9 +827,6 @@ asmlinkage void schedule(void)
if (likely(prev != next)) { if (likely(prev != next)) {
rq->nr_switches++; rq->nr_switches++;
rq->curr = next; rq->curr = next;
spin_lock(&rq->frozen);
spin_unlock(&rq->lock);
context_switch(prev, next); context_switch(prev, next);
/* /*
...@@ -840,10 +836,8 @@ asmlinkage void schedule(void) ...@@ -840,10 +836,8 @@ asmlinkage void schedule(void)
*/ */
mb(); mb();
rq = this_rq(); rq = this_rq();
spin_unlock_irq(&rq->frozen);
} else {
spin_unlock_irq(&rq->lock);
} }
spin_unlock_irq(&rq->lock);
reacquire_kernel_lock(current); reacquire_kernel_lock(current);
preempt_enable_no_resched(); preempt_enable_no_resched();
...@@ -1599,7 +1593,6 @@ void __init sched_init(void) ...@@ -1599,7 +1593,6 @@ void __init sched_init(void)
rq->active = rq->arrays; rq->active = rq->arrays;
rq->expired = rq->arrays + 1; rq->expired = rq->arrays + 1;
spin_lock_init(&rq->lock); spin_lock_init(&rq->lock);
spin_lock_init(&rq->frozen);
INIT_LIST_HEAD(&rq->migration_queue); INIT_LIST_HEAD(&rq->migration_queue);
for (j = 0; j < 2; j++) { for (j = 0; j < 2; j++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment