Re: [PATCH 01/18] move do_timer() from kernel/timer.c intokernel/time/timekeeping.c

From: Peter Zijlstra
Date: Wed Jan 26 2011 - 05:03:38 EST


On Wed, 2011-01-26 at 13:56 +0800, Yong Zhang wrote:


> +static __init void start_calc_global_timer()
> +{
> + calc_load_update = jiffies + LOAD_FREQ;

That should really be done where it was done in sched_init(), otherwise
rq->calc_load_update and this get out of sync.

> + set_timer_slack(&global_load_timer, 0);

Ah, there an actual function for that ;-)

> + mod_timer(&global_load_timer, calc_load_update + 10);
> +}



> @@ -7741,6 +7752,8 @@ void __init sched_init_smp(void)
> {
> cpumask_var_t non_isolated_cpus;
>
> + start_calc_global_timer();
> +
> alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
> alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
>
> @@ -7777,6 +7790,7 @@ void __init sched_init_smp(void)
> #else
> void __init sched_init_smp(void)
> {
> + start_calc_global_timer();
> sched_init_granularity();
> }
> #endif /* CONFIG_SMP */

Right, I done the same thing, except didn't do that wrapper function.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/