Messages in this thread | | | From | "Yu, Fenghua" <> | Date | Tue, 6 Dec 2011 16:04:56 -0800 | Subject | RE: [PATCH v4 0/7] x86: BSP or CPU0 online/offline |
| |
> > 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
| |