one coments; will comment more when I get to work<br><br><div class="gmail_quote">On Tue, Feb 14, 2012 at 1:48 AM, Srivatsa S. Bhat </div><div class="gmail_quote"><br></div><div class="gmail_quote">7. And whichever code between smp_init() and async_synchronize_full() didn't<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
care about CPU hotplug till today but depended on all cpus being online must<br>
suddenly start worrying about CPU Hotplug. They must register a cpu notifier<br>
and handle callbacks etc etc.. Or if they are not worth that complexity, they<br>
should atleast be redesigned or moved around - like the print statements that<br>
tell how many cpus came up, for example.<br><br></blockquote><div><br></div><div>frankly, such code HAS to worry about cpus going online and offline even today; the firmware, at least on X86, can start taking cores offline/online once ACPI is initialized....</div>
<div>(as controlled by a data center manager from outside the box, usually done based on thermal or power conditions on a datacenter level).</div><div>Now, no doubt that we have bugs in this space, since this only happened very rarely before.</div>
<div><br></div><div>Question is what to do from a longer term strategy:</div><div>Either we declare the number of online CPUs invariant during a certain phase of the boot (and make ACPI and co honor this as well somehow)</div>
<div>or</div><div>We decide to go about fixing these (maybe with the help of lockdep?)</div><div><br></div><div>In addition to this, the reality is that the whole "bring cpus up" sequence needs to be changed; the current one is very messy and requires the hotplug lock for the whole bring up of each individual cpu... which is a very unfortunate design; a much better design would be to only take the lock for the actual registration of the newly brought up CPU to the kernel, while running the physical bringup without the global lock.</div>
<div>If/when that change gets made, we can do the physical bring up in parallel (with each other, but also with the rest of the kernel boot), and do the registration en-mass at some convenient time in the boot, potentially late.</div>
<div><br></div><div> </div></div>