Difference between logical and physical cpu hotplug

Vaibhav Jain vjoss197 at gmail.com
Thu Aug 18 10:54:05 EDT 2011


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 ?


On Wed, Aug 17, 2011 at 9:32 AM, Mulyadi Santosa
<mulyadi.santosa at gmail.com>wrote:

> Hi....
>
> On Wed, Aug 17, 2011 at 12:14, Vaibhav Jain <vjoss197 at gmail.com> wrote:
> > Hi,
> >
> > I need to know the difference between making a cpu logically offline
> > and physically offline. I have read that the following command
> >
> > $ echo 0  > /sys/device/system/cpu/<cpu number>/online
> >
> > makes a cpu logically offline. It frees the cpu from interrupts and
> migrates
> > running processes.
> > But then what does it mean to make a cpu physically offline ?
> > I referred to following article :
> >
> > http://www.kernel.org/doc/Documentation/cpu-hotplug.txt
> >
> > Here is the relevant excerpt :
> >
> > Q: Does hot-add/hot-remove refer to physical add/remove of cpus?
> > A: The usage of hot-add/remove may not be very consistently used in the
> > code.
> > CONFIG_HOTPLUG_CPU enables logical online/offline capability in the
> kernel.
> > To support physical addition/removal, one would need some BIOS hooks and
> > the platform should have something like an attention button in PCI
> hotplug.
> > CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of
> > CPUs.
>
> IMHO, logical cpu online capability is a foundation or baseline for
> going into physical cpu offline/online. It's like disk hot swap in
> RAID software. Since we can "remove" a RAID member, then removing them
> is not a problem.
>
> Spesificly about CPU, i think the clue here is "BIOS hook". Meaning?
> We do cpu unplug by ... maybe pressing a button or engaging a
> menu...and then, motherboard sends notification to the Linux kernel
> and Linux kernel does whatever necessary (process migration, turning
> off LAPIC etc) before CPU is safe to be removed.
>
> What do you think?
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110818/fa949012/attachment-0001.html 


More information about the Kernelnewbies mailing list