[lhcs-devel] Re: [RFC] don't create cpu/online sysfs file

Ashok Raj ashok.raj at intel.com
Sat Jun 5 08:49:52 EST 2004

On Fri, Jun 04, 2004 at 03:32:01PM -0700, Dave Hansen wrote:
>    On Fri, 2004-06-04 at 15:06, Joel Schopp wrote:
>    > I might change cpu_is_hotpluggable to __cpu_is_hotpluggable to help
>    > indicate it is a platform specific function.
>    Yeah, that naming is a lot more consistent with the other functions in
>    the arch-specific cpu hotplug code.  New version attached.
>    > Also, won't you want to
>    > stub out the function for the other platforms that do cpu hotplug?
>    Gah.  There weren't any in 2.6.6, but it looks like ia64 got merged
>    recently.  I see it in 2.6.7-rc2-mm2.  cc'ing ia64 list...
>    Any comments from the ia64 crowd on this one?  It should maintain
>    existing behavior on your platform.  You can always make that function
>    smarter in the future if you like.

In IA64 if we consider just logical offline, any processor could be put back
in SAL_BOOT_RENDEZ mode, i.e the same state the processor was before
woken as a secondary proccessor. (including the boot cpu). [this code to
place the processor in this mode is not yet in the mainline code for ia64
merged in the 2.6.7-rc series.

Current state of CPU hotplug for IA64 we dont permit boot cpu as there is
some code that needs to be changed (master timekeeper), once we do that any cpu
could be taken logically offline.

Instead of not creating the control files, would it be fine if we are able to
display a status instead? In think in the long run, if we are going to remove
the /proc/cpu's etc, how about make an info file that can display
status of all cpu's present. i.e

place a file in /sys/devices/system/cpuinfo, which when one does a cat on
can display

cpu0:	online, not offlinable
cpu1:	online
cpu2:	offline (meaning present)

the reason this cannot be determined at early time, is say if a set of cpu's are
in a special mode, i.e only those 4 cpu's can retrieve a set of platform registers.
for error processing. And i can offline each of those, until i run into the last
of those 4 cpus.

I would prefer to not have a macro to preventy its creation, but have a
facility to know the offlineable status via a single information file, and
let __cpu_disable() determine if offline should fail based on current ability
to offline a cpu.

what do you think?


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list