[lkml]   [2005]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: CPU hotplug on i386

On Wednesday, 16 of March 2005 14:21, Pavel Machek wrote:
> Hi!
> I tried to solve long-standing uglyness in swsusp cmp code by calling
> cpu hotplug... only to find out that CONFIG_CPU_HOTPLUG is not
> available on i386. Is there way to enable CPU_HOTPLUG on i386?

Heh, that's exactly what I was thinking about. ;-)

AFAICS we don't need the full CPU hotplug to do this. For suspend, we need to
enable the CPU hotplug-related code in sched.c and cpu.c, and we need to
implement the functions __cpu_disable() and __cpu_die() (called from within
cpu.c) on each architecture for which we want swsusp to work on SMP.

If that's acceptable, the CPU hotplug code in sched.c and cpu.c may be
enabled by changing some #ifdefs there. For example, we could replace the



&& defined(CONFIG_SMP))

wherever necessary.

The implementation of __cpu_disable() and __cpu_die() may be a bit more
tricky, however. In __cpu_disable() we need to save the settings of the local
APIC of each CPU (on x86-64, at least) etc. In __cpu_die() we should give the
"frozen" CPU some "neutral" code to execute, it seems (or "hlt" it?).

I've looked at the ia64 implementation of these functions, but I haven't fully
understood it yet.


- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:11    [W:0.122 / U:15.860 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site