Hi,<br><br>I talked to a friend of mine and he suggested that <br>in a logical offline state the cpu is powered on and ready to execute instructions<br>just that the kernel is not aware of it. But in case of physical offline state the cpu <br>
is powered off and cannot run.<br>Are you saying something similar ?<br><br><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 9:32 AM, Mulyadi Santosa <span dir="ltr"><<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi....<br>
<div><div></div><div class="h5"><br>
On Wed, Aug 17, 2011 at 12:14, Vaibhav Jain <<a href="mailto:vjoss197@gmail.com">vjoss197@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I need to know the difference between making a cpu logically offline<br>
> and physically offline. I have read that the following command<br>
><br>
> $ echo 0 > /sys/device/system/cpu/<cpu number>/online<br>
><br>
> makes a cpu logically offline. It frees the cpu from interrupts and migrates<br>
> running processes.<br>
> But then what does it mean to make a cpu physically offline ?<br>
> I referred to following article :<br>
><br>
> <a href="http://www.kernel.org/doc/Documentation/cpu-hotplug.txt" target="_blank">http://www.kernel.org/doc/Documentation/cpu-hotplug.txt</a><br>
><br>
> Here is the relevant excerpt :<br>
><br>
> Q: Does hot-add/hot-remove refer to physical add/remove of cpus?<br>
> A: The usage of hot-add/remove may not be very consistently used in the<br>
> code.<br>
> CONFIG_HOTPLUG_CPU enables logical online/offline capability in the kernel.<br>
> To support physical addition/removal, one would need some BIOS hooks and<br>
> the platform should have something like an attention button in PCI hotplug.<br>
> CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of<br>
> CPUs.<br>
<br>
</div></div>IMHO, logical cpu online capability is a foundation or baseline for<br>
going into physical cpu offline/online. It's like disk hot swap in<br>
RAID software. Since we can "remove" a RAID member, then removing them<br>
is not a problem.<br>
<br>
Spesificly about CPU, i think the clue here is "BIOS hook". Meaning?<br>
We do cpu unplug by ... maybe pressing a button or engaging a<br>
menu...and then, motherboard sends notification to the Linux kernel<br>
and Linux kernel does whatever necessary (process migration, turning<br>
off LAPIC etc) before CPU is safe to be removed.<br>
<br>
What do you think?<br>
<font color="#888888">--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
</font></blockquote></div><br>