Exploring the latest code on github. Comparing the two. Again, no guarantees. This is just a lead, for the brave at heart ....
--- tick-sched-2.6.35-23.c 2010-12-06 22:44:02.821102001 +0530 +++ tick-sched-2.6.37-github.c 2010-12-06 22:42:40.451102001 +0530 @@ -405,13 +405,7 @@ void tick_nohz_stop_sched_tick(int inidl * the scheduler tick in nohz_restart_sched_tick. */ if (!ts->tick_stopped) { - if (select_nohz_load_balancer(1)) { - /* - * sched tick not stopped! - */ - cpumask_clear_cpu(cpu, nohz_cpu_mask); - goto out; - } + select_nohz_load_balancer(1);
ts->idle_tick = hrtimer_get_expires(&ts->sched_timer); ts->tick_stopped = 1; @@ -780,7 +774,6 @@ void tick_setup_sched_timer(void) { struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); ktime_t now = ktime_get(); - u64 offset;
/* * Emulate tick processing via per-CPU hrtimers: @@ -790,10 +783,6 @@ void tick_setup_sched_timer(void)
/* Get the next period (per cpu) */ hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update()); - offset = ktime_to_ns(tick_period) >> 1; - do_div(offset, num_possible_cpus()); - offset *= smp_processor_id(); - hrtimer_add_expires_ns(&ts->sched_timer, offset);
for (;;) { hrtimer_forward(&ts->sched_timer, now, tick_period);
Exploring the latest code on github. Comparing the two.
Again, no guarantees. This is just a lead, for the brave at heart ....
--- tick-sched- 2.6.35- 23.c 2010-12-06 22:44:02.821102001 +0530 2.6.37- github. c 2010-12-06 22:42:40.451102001 +0530 stop_sched_ tick(int inidl sched_tick. nohz_load_ balancer( 1)) { clear_cpu( cpu, nohz_cpu_mask); nohz_load_ balancer( 1);
+++ tick-sched-
@@ -405,13 +405,7 @@ void tick_nohz_
* the scheduler tick in nohz_restart_
*/
if (!ts->tick_stopped) {
- if (select_
- /*
- * sched tick not stopped!
- */
- cpumask_
- goto out;
- }
+ select_
ts->idle_tick = hrtimer_ get_expires( &ts->sched_ timer); >tick_stopped = 1; sched_timer( void) cpu_var( tick_cpu_ sched);
ts-
@@ -780,7 +774,6 @@ void tick_setup_
{
struct tick_sched *ts = &__get_
ktime_t now = ktime_get();
- u64 offset;
/* sched_timer( void)
* Emulate tick processing via per-CPU hrtimers:
@@ -790,10 +783,6 @@ void tick_setup_
/* Get the next period (per cpu) */ set_expires( &ts->sched_ timer, tick_init_ jiffy_update( )); ns(tick_ period) >> 1; cpus()) ; add_expires_ ns(&ts- >sched_ timer, offset);
hrtimer_
- offset = ktime_to_
- do_div(offset, num_possible_
- offset *= smp_processor_id();
- hrtimer_
for (;;) { forward( &ts->sched_ timer, now, tick_period);
hrtimer_