Re: [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets

From: Rafael J. Wysocki
Date: Fri Feb 10 2012 - 17:35:21 EST


On Friday, February 10, 2012, Alan Stern wrote:
> On Fri, 10 Feb 2012, Peter Zijlstra wrote:
>
> > Now the whole problem here seems to be that suspend uses cpu-hotplug to
> > reduce the machine to UP -- I've no clue why it does that but I can
> > imagine its because the BIOS calls only work on CPU0 and/or the resume
> > only wakes CPU0 so you have to bootstrap the SMP thing again..

Yes, that's the main problem.

> > Some suspend person wanna clarify? Rafael?
>
> If I understand correctly, ACPI requires that only CPU0 be running when
> the system is suspended (i.e., your guess is right). Of course, this
> doesn't apply to non-ACPI systems, but it's easiest to do the same
> thing everywhere.

That's correct. Plus we have some code in the kernel (syscore_ops in
general) that assumes to be executed on one CPU with interrupts off.
Plus I'm not sure how the ACPI low-level suspend is going to behave if it's
not executed on the boot CPU.

> > Anyway, the whole suspend case is magic anyway since all tasks will have
> > been frozen, so we could simply leave all of cpuset alone and ignore the
> > hotplug notifier on CPU_TASKS_FROZEN callbacks, hmm?
>
> I don't see why not. Presumably no CPUs will be added or removed while
> the system is asleep.

ACPI explicitly forbids that level of hardware reconfiguration in a sleep
state (even in S4), AFAICS. Still, people may try to do that ...

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/