RE: [PATCH v4 0/7] x86: BSP or CPU0 online/offline

From: Yu, Fenghua
Date: Tue Dec 06 2011 - 19:05:04 EST


>
> The specific point i tried to make about s2ram is to make sure
> it does not break during normal usage: for example someone
> offlines the boot CPU, but the box then gets suspended - that
> should not hang or crash.
>
This has been considered in the patch #7/7. There shouldn't be a problem here (in theory).

Suspend/hibernate calls callback bsp_pm_callback() and must pass this check before it can continue.

When CPU0 is offline, bsp_pm_callback() returns -ENODEV and suspend/hibernate fails. When CPU0 is online, bsp_pm_callback() returns 0 and suspend/hibernate can continue.

So when CPU0 is offline, system cannot suspend/hibernate. Suspend/hibernate can succeed only when CPU0 is online.

Plus the patch #7/7 considers race condition by pm_notifier_call_chain()'s priority in pm call chain. So there should be race issue here.

Thanks.

-Fenghua
--
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/