Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: refactor wait_for_completion_timeout() sched: fix wait_for_completion_timeout() spurious failure under heavy load sched: rt: dont stop the period timer when there are tasks wanting to run
This commit is contained in:
commit
0e053738b5
@ -4398,22 +4398,20 @@ do_wait_for_common(struct completion *x, long timeout, int state)
|
|||||||
signal_pending(current)) ||
|
signal_pending(current)) ||
|
||||||
(state == TASK_KILLABLE &&
|
(state == TASK_KILLABLE &&
|
||||||
fatal_signal_pending(current))) {
|
fatal_signal_pending(current))) {
|
||||||
__remove_wait_queue(&x->wait, &wait);
|
timeout = -ERESTARTSYS;
|
||||||
return -ERESTARTSYS;
|
break;
|
||||||
}
|
}
|
||||||
__set_current_state(state);
|
__set_current_state(state);
|
||||||
spin_unlock_irq(&x->wait.lock);
|
spin_unlock_irq(&x->wait.lock);
|
||||||
timeout = schedule_timeout(timeout);
|
timeout = schedule_timeout(timeout);
|
||||||
spin_lock_irq(&x->wait.lock);
|
spin_lock_irq(&x->wait.lock);
|
||||||
if (!timeout) {
|
} while (!x->done && timeout);
|
||||||
__remove_wait_queue(&x->wait, &wait);
|
|
||||||
return timeout;
|
|
||||||
}
|
|
||||||
} while (!x->done);
|
|
||||||
__remove_wait_queue(&x->wait, &wait);
|
__remove_wait_queue(&x->wait, &wait);
|
||||||
|
if (!x->done)
|
||||||
|
return timeout;
|
||||||
}
|
}
|
||||||
x->done--;
|
x->done--;
|
||||||
return timeout;
|
return timeout ?: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long __sched
|
static long __sched
|
||||||
|
@ -250,7 +250,8 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
|
|||||||
if (rt_rq->rt_time || rt_rq->rt_nr_running)
|
if (rt_rq->rt_time || rt_rq->rt_nr_running)
|
||||||
idle = 0;
|
idle = 0;
|
||||||
spin_unlock(&rt_rq->rt_runtime_lock);
|
spin_unlock(&rt_rq->rt_runtime_lock);
|
||||||
}
|
} else if (rt_rq->rt_nr_running)
|
||||||
|
idle = 0;
|
||||||
|
|
||||||
if (enqueue)
|
if (enqueue)
|
||||||
sched_rt_rq_enqueue(rt_rq);
|
sched_rt_rq_enqueue(rt_rq);
|
||||||
|
Loading…
Reference in New Issue
Block a user