kernel/sched.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux-2.6.15-rc3-ck1/kernel/sched.c =================================================================== --- linux-2.6.15-rc3-ck1.orig/kernel/sched.c 2005-11-30 09:28:22.000000000 +1100 +++ linux-2.6.15-rc3-ck1/kernel/sched.c 2005-11-30 09:28:22.000000000 +1100 @@ -16,9 +16,9 @@ * by Davide Libenzi, preemptible kernel bits by Robert Love. * 2003-09-03 Interactivity tuning by Con Kolivas. * 2004-04-02 Scheduler domains code by Nick Piggin - * 2005-11-20 New staircase scheduling policy by Con Kolivas with help + * 2005-11-25 New staircase scheduling policy by Con Kolivas with help * from William Lee Irwin III, Zwane Mwaikambo & Peter Williams. - * Staircase v13.1 + * Staircase v13.2 */ #include @@ -1202,20 +1202,20 @@ static inline int wake_idle(int cpu, tas #endif /* - * cache_delay is the time preemption is delayed in sched_compute mode + * CACHE_DELAY is the time preemption is delayed in sched_compute mode * and is set to a nominal 10ms. */ -static int cache_delay __read_mostly = 10 * HZ / 1001 + 1; +#define CACHE_DELAY (10 * (HZ) / 1001 + 1) /* * Check to see if p preempts rq->curr and resched if it does. In compute - * mode we do not preempt for at least cache_delay and set rq->preempted. + * mode we do not preempt for at least CACHE_DELAY and set rq->preempted. */ static void preempt(task_t *p, runqueue_t *rq) { if (p->prio >= rq->curr->prio) return; - if (!sched_compute || rq->cache_ticks >= cache_delay || + if (!sched_compute || rq->cache_ticks >= CACHE_DELAY || !p->mm || rt_task(p)) resched_task(rq->curr); rq->preempted = 1; @@ -2573,7 +2573,7 @@ void scheduler_tick(void) goto out_unlock; } rq->cache_ticks++; - if (rq->preempted && rq->cache_ticks >= cache_delay) { + if (rq->preempted && rq->cache_ticks >= CACHE_DELAY) { set_tsk_need_resched(p); goto out_unlock; }