Index: linux-2.6.19-rc2-mm2/include/linux/sched.h =================================================================== --- linux-2.6.19-rc2-mm2.orig/include/linux/sched.h 2006-10-23 20:58:26.000000000 -0500 +++ linux-2.6.19-rc2-mm2/include/linux/sched.h 2006-10-23 23:33:40.308802289 -0500 @@ -692,7 +692,7 @@ struct sched_domain { int flags; /* See SD_* */ /* Runtime fields. */ - unsigned long next_balance; /* init to jiffies. units in jiffies */ + unsigned long long next_balance;/* sched_clock in nanoseconds */ unsigned int balance_interval; /* initialise to 1. units in ms. */ unsigned int nr_balance_failed; /* initialise to 0 */ Index: linux-2.6.19-rc2-mm2/kernel/sched.c =================================================================== --- linux-2.6.19-rc2-mm2.orig/kernel/sched.c 2006-10-23 23:26:17.000000000 -0500 +++ linux-2.6.19-rc2-mm2/kernel/sched.c 2006-10-23 23:37:03.552066184 -0500 @@ -2817,7 +2817,7 @@ static void active_load_balance(struct r spin_unlock(&target_rq->lock); } -static DEFINE_PER_CPU(unsigned long, next_balance); +static DEFINE_PER_CPU(unsigned long long, next_balance); /* * rebalance_domains is triggered when needed via a tasklet from the @@ -2838,7 +2838,7 @@ static void rebalance_domains(unsigned l enum idle_type idle = (this_rq->idle && !this_rq->nr_running) ? SCHED_IDLE : NOT_IDLE; /* Maximum time between calls to rebalance_domains */ - unsigned long next_balance = jiffies + 60*HZ; + unsigned long long next_balance = sched_clock() + 60*1000000UL; for_each_domain(this_cpu, sd) { if (!(sd->flags & SD_LOAD_BALANCE)) @@ -2849,7 +2849,7 @@ static void rebalance_domains(unsigned l interval *= sd->busy_factor; /* scale ms to jiffies */ - interval = msecs_to_jiffies(interval); + interval = interval * 1000; if (unlikely(!interval)) interval = 1; @@ -3148,7 +3148,7 @@ void scheduler_tick(void) time_slice(rq, p); } update_load(rq); - if (jiffies >= __get_cpu_var(next_balance)) + if (now >= __get_cpu_var(next_balance)) tasklet_schedule(&rebalance); }