On Thu, Aug 18, 2011 at 9:02 AM, srivatsa bhat <[email protected]>wrote:
> Hi Vaibhav, > > On Thu, Aug 18, 2011 at 8:24 PM, Vaibhav Jain <[email protected]> wrote: > >> Hi, >> >> I talked to a friend of mine and he suggested that >> in a logical offline state the cpu is powered on and ready to execute >> instructions >> just that the kernel is not aware of it. But in case of physical offline >> state the cpu >> is powered off and cannot run. >> Are you saying something similar ? >> >> Yes, you are right, mostly. > When you try to logically offline a CPU, the kernel will do task migration > (i.e., move out all the tasks running on that CPU to other CPUs in the > system) and it ensures that it doesn't need that CPU anymore. This also > means that, from now on, the context of that CPU need not be saved (because > the kernel has moved that CPU's tasks elsewhere). At this point, it is as if > the kernel is purposefully using only a subset of the available CPUs. This > step is a necessary prerequisite to do physical CPU offline later on. > > But I don't think CPU power ON or OFF is the differentiating factor between > logical and physical offlining. In logical offline, you still have the CPUs > in the system but you just tell the kernel not to use them. At this stage, > you can power off your CPU, to save power for example. > But in physical offline, from a software perspective, you do additional > work at the firmware level (apart from logical offlining at the OS level), > to ensure that physically plugging out the CPUs will not affect the running > system in any way. > > Please note that you can logically online and offline the same CPUs over > and over again without rebooting the system. Here, while onlining a CPU > which was offlined previously, the kernel follows almost the same sequence > which it normally follows while booting the CPUs during full system booting. > > Also one more thing to be noted is that, to be able to physically hot-plug > CPUs, apart from OS and firmware support, you also need the hardware to > support this feature. That is, the electrical wiring to the individual CPUs > should be such that plugging them in and out does not interfere with the > functioning of the rest of the system. As of today, there are only a few > systems that support physical CPU-hotplug. But you can do logical CPU > hotplug easily, by configuring the kernel appropriately during compilation, > as you have noted in one of your previous mails. > > Regards, > Srivatsa S. Bhat > Hi Srivatsa, That was great explanation! Thanks! I have just one more query. You mentioned above that " the kernel follows almost the same *sequence *which it normally follows while booting the CPUs during full system booting." Can you please explain this sequence a little ? Thanks Vaibhav Jain
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
