Re: [LNG] Re: [PATCH 12/14] hrtimer: don't emulate notifier call to initialize timer base

From: Viresh Kumar
Date: Wed Mar 26 2014 - 10:17:29 EST


On 26 March 2014 18:10, Srivatsa S. Bhat
<srivatsa.bhat@xxxxxxxxxxxxxxxxxx> wrote:
> I don't think this is such a good idea. Open-coding a part of that callback
> in the init routine can lead to loop-holes down the road:

We think that we are open-coding part of that callback here because it is
implemented that way on the first design.

Rather, we should have a common routine which should do all the work
required when a CPU comes up. And any modification should be done
to that code.

> what if someone
> changes or adds something to the CPU_UP_PREPARE switch-case, and forgets to
> do the same in the init-routine?

This is not a driver which only 2-3 people use. This part is so well reviewed
by so many highly smart people that this should never happen. And if it
happens than its nothing but a review mistake.

> It is more comforting to know that there is just one single place where CPU
> hotplug operations are handled (hrtimer_cpu_notify). That, in turn is good
> for reliability because it makes it easier to write bug-free code.

And for me that single place is: init_hrtimers_cpu() :)
--
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/