aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-11-11 16:54:20 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-11-11 18:00:33 -0500
commit6fbc3b495cccf2e4ab7d4ab674b5c576e9946bed (patch)
treeeb92a7c3e2077f98eec316a6b61c8f7da998957d
parent5a0df8d4e9a5da47c804d89426f06e08aa44426f (diff)
Workaround: do not set rq->skip_clock_update
Disabling the clock update seems to be causing problems even in normal Linux, and causes major bugs under LITMUS^RT. As a workaround, just disable this "optimization" for now. Details: the idle load balancer causes tasks that suspsend to be marked with set_tsk_need_resched(). When such a task resumes, it may wrongly trigger the setting of skip_clock_update. However, a corresponding rescheduling event may not happen immediately, such that the currently-scheduled task is no longer charged for its execution time.
-rw-r--r--kernel/sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 60fbae0c747c..1b13c8e1cfc2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -578,8 +578,14 @@ void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
578 * A queue event has occurred, and we're going to schedule. In 578 * A queue event has occurred, and we're going to schedule. In
579 * this case, we can save a useless back to back clock update. 579 * this case, we can save a useless back to back clock update.
580 */ 580 */
581 /* LITMUS^RT: turning off the clock update is buggy in Linux 2.6.36;
582 * the scheduler can "forget" to renable the runqueue clock in some
583 * cases. LITMUS^RT amplifies the effects of this problem. Hence, we
584 * turn it off to avoid stalling clocks. */
585 /*
581 if (test_tsk_need_resched(p)) 586 if (test_tsk_need_resched(p))
582 rq->skip_clock_update = 1; 587 rq->skip_clock_update = 1;
588 */
583} 589}
584 590
585static inline int cpu_of(struct rq *rq) 591static inline int cpu_of(struct rq *rq)