aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@jupiter-cs.cs.unc.edu>2007-02-02 12:56:12 -0500
committerBjoern B. Brandenburg <bbb@jupiter-cs.cs.unc.edu>2007-02-02 12:56:12 -0500
commitcc1f93c32de08f00063699e52260b709962f239c (patch)
tree06e1c78819d458796a17048cba9c808014979f35 /kernel
parentc1990ca306ab9c1d9f677819f30e7a10346b8414 (diff)
scheduler_tick patched up
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index eddcab8877..baaa7b1399 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3037,7 +3037,7 @@ static inline void idle_balance(int cpu, struct rq *rq)
3037static inline void wake_priority_sleeper(struct rq *rq) 3037static inline void wake_priority_sleeper(struct rq *rq)
3038{ 3038{
3039#ifdef CONFIG_SCHED_SMT 3039#ifdef CONFIG_SCHED_SMT
3040 if (!rq->nr_running) 3040 if (!rq->nr_running || get_rt_mode() == MODE_RT_RUN)
3041 return; 3041 return;
3042 3042
3043 spin_lock(&rq->lock); 3043 spin_lock(&rq->lock);
@@ -3267,14 +3267,27 @@ void scheduler_tick(void)
3267 3267
3268 update_cpu_clock(p, rq, now); 3268 update_cpu_clock(p, rq, now);
3269 3269
3270 if (p == rq->idle) 3270 /* check whether the RT scheduler plugin requires a call to
3271 /* Task on the idle queue */ 3271 * schedule
3272 wake_priority_sleeper(rq); 3272 */
3273 else 3273 if (curr_sched_plugin->scheduler_tick() == FORCE_RESCHED)
3274 task_running_tick(rq, p); 3274 set_tsk_need_resched(p);
3275
3276 /* real-time accounting is done by the plugin
3277 * call linux functions only for background tasks
3278 */
3279 if (!is_realtime(p)) {
3280 if (p == rq->idle)
3281 /* Task on the idle queue */
3282 wake_priority_sleeper(rq);
3283 else
3284 task_running_tick(rq, p);
3285 }
3286
3275#ifdef CONFIG_SMP 3287#ifdef CONFIG_SMP
3276 update_load(rq); 3288 update_load(rq);
3277 if (time_after_eq(jiffies, rq->next_balance)) 3289 if (time_after_eq(jiffies, rq->next_balance) &&
3290 get_rt_mode() == MODE_NON_RT)
3278 raise_softirq(SCHED_SOFTIRQ); 3291 raise_softirq(SCHED_SOFTIRQ);
3279#endif 3292#endif
3280} 3293}