But init_timers() directly calls timer_cpu_notify(), which directly
calls init_timers_cpu().
So your patch appears to be a no-op for the boot CPU.
> 2.) This notifier is called when a cpu comes up. I suspect
> that initializing the timer list when a hot swap of a cpu is
> done is NOT the right thing to do. In any case, if this is
> a desired action, the list still needs to be initialized
> prior to its use.
It should be OK as-is? The CPU_UP_PREPARE callout is performed
before the secondary starts doing things. Its timers are initialised.
> The attached patch initializes all the timer lists at
> init_timers time and does not put code in the notify list.
But the patch assumes that the per-cpu data exists for all CPUs - even
the !cpu_possible() ones.
This is true at present. But the intent here is that the per-cpu
storage be allocated as the CPUs come up, and in their node-local
memory. That saves memory and presumably having the cpu-local timers
in the cpu-local memory is a good thing.
I have working code which did all that, but it sort-of got lost
because there was a lot going on at the time.
Have you actually observed any problem?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/