partition suspend updates
Status from this message: Applied to powerpc/next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest28 patches 1 replyApplied
- v129 patches 15 repliesSuperseded
Changes in v2 from the cover letter
- Drop "powerpc/rtas: move rtas_call_reentrant() out of pseries guards". rtas_call_reentrant() actually is pseries-specific and this broke builds without CONFIG_PPC_PSERIES set.
- Simplify polling logic in wait_for_vasi_session_suspending(). ("powerpc/pseries/mobility: extract VASI session polling logic")
- Use direct return instead of goto in pseries_migrate_partition(). ("powerpc/pseries/mobility: use stop_machine for join/suspend")
- Change dispatch of ibm,suspend-me in rtas syscall path to use conventional config symbol guards instead of a weak function. ("powerpc/rtas: dispatch partition migration requests to pseries")
- Fix refcount imbalance in add_dt_node() error path. ("powerpc/pseries/mobility: refactor node lookup during DT update")
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | powerpc/rtas: prevent suspend-related sys_rtas use on LEarch/ | +2 | 0 replies | |
| 2/28 | powerpc/rtas: complete ibm,suspend-me status codesarch/ | +6 | 0 replies | |
| 3/28 | powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafearch/ arch/ arch/ | +5 | 0 replies | |
| 4/28 | powerpc/rtas: add rtas_ibm_suspend_me()arch/ arch/ | +58 | 0 replies | |
| 5/28 | powerpc/rtas: add rtas_activate_firmware()arch/ arch/ | +31 | 0 replies | |
| 6/28 | powerpc/hvcall: add token and codes for H_VASI_SIGNALarch/ | +9 | 0 replies | |
| 7/28 | powerpc/pseries/mobility: don't error on absence of ibm, update-nodesarch/ | +1 | 0 replies | |
| 8/28 | powerpc/pseries/mobility: add missing break to default casearch/ | +1 | 0 replies | |
| 9/28 | powerpc/pseries/mobility: error message improvementsarch/ | +3 | 0 replies | |
| 10/28 | powerpc/pseries/mobility: use rtas_activate_firmware() on resumearch/ | +1 | 0 replies | |
| 11/28 | powerpc/pseries/mobility: extract VASI session polling logicarch/ | +64 | 0 replies | |
| 12/28 | powerpc/pseries/mobility: use stop_machine for join/suspendarch/ | +125 | 0 replies | |
| 13/28 | powerpc/pseries/mobility: signal suspend cancellation to platformarch/ | +31 | 0 replies | |
| 14/28 | powerpc/pseries/mobility: retry partition suspend after errorarch/ | +57 | 0 replies | |
| 15/28 | powerpc/rtas: dispatch partition migration requests to pseriesarch/ arch/ arch/ | +11 | 0 replies | |
| 16/28 | powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()arch/ arch/ | +1 | 0 replies | |
| 17/28 | powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend opsarch/ | +0 | 0 replies | |
| 18/28 | powerpc/pseries/hibernation: pass stream id via function argumentsarch/ | +3 | 0 replies | |
| 19/28 | powerpc/pseries/hibernation: remove pseries_suspend_cpu()arch/ | +0 | 0 replies | |
| 20/28 | powerpc/machdep: remove suspend_disable_cpu()arch/ | +0 | 0 replies | |
| 21/28 | powerpc/rtas: remove rtas_suspend_cpu()arch/ arch/ | +0 | 0 replies | |
| 22/28 | powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me()arch/ | +1 | 0 replies | |
| 23/28 | powerpc/rtas: remove unused rtas_suspend_last_cpu()arch/ arch/ | +0 | 0 replies | |
| 24/28 | powerpc/pseries/hibernation: remove redundant cacheinfo updatearch/ | +0 | 0 replies | |
| 25/28 | powerpc/pseries/hibernation: perform post-suspend fixups laterarch/ | +4 | 0 replies | |
| 26/28 | powerpc/pseries/hibernation: remove prepare_late() callbackarch/ | +0 | 0 replies | |
| 27/28 | powerpc/rtas: remove unused rtas_suspend_me_dataarch/ | +0 | 0 replies | |
| 28/28 | powerpc/pseries/mobility: refactor node lookup during DT updatearch/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/28] partition suspend updates
This series aims to improve the pseries-specific partition migration and hibernation implementation, part of which has been living in kernel/rtas.c. Most of that code is eliminated or moved to platforms/pseries, and the following major functional changes are made:
- Use stop_machine() instead of on_each_cpu() to avoid deadlock in the join/suspend sequence.
- Retry the join/suspend sequence on errors that are likely to be transient. This is a mitigation for the fact that drivers currently have no way to prepare for an impending partition suspension, sometimes resulting in a virtual adapter being in a state which causes the platform to fail the suspend call.
- Request cancellation of the migration via H_VASI_SIGNAL if Linux is going to error out of the suspend attempt. This allows the management console and other entities to promptly clean up their operations instead of relying on long timeouts to fail the migration.
- Little-endian users of ibm,suspend-me, ibm,update-nodes and ibm,update-properties via sys_rtas are blocked when CONFIG_PPC_RTAS_FILTERS is enabled.
- Legacy user space code (drmgr) historically has driven the migration process by using sys_rtas to separately call ibm,suspend-me, ibm,activate-firmware, and ibm,update-nodes/properties, in that order. With these changes, when sys_rtas() dispatches ibm,suspend-me, the kernel performs the device tree update and firmware activation before returning. This is more reliable, and drmgr does not seem bothered by it.
- If the H_VASI_STATE hcall is absent, the implementation proceeds with the suspend instead of erroring out. This allows us to exercise these code paths in QEMU.
Changes since v1:
- Drop "powerpc/rtas: move rtas_call_reentrant() out of pseries guards". rtas_call_reentrant() actually is pseries-specific and this broke builds without CONFIG_PPC_PSERIES set.
- Simplify polling logic in wait_for_vasi_session_suspending(). ("powerpc/pseries/mobility: extract VASI session polling logic")
- Use direct return instead of goto in pseries_migrate_partition(). ("powerpc/pseries/mobility: use stop_machine for join/suspend")
- Change dispatch of ibm,suspend-me in rtas syscall path to use conventional config symbol guards instead of a weak function. ("powerpc/rtas: dispatch partition migration requests to pseries")
- Fix refcount imbalance in add_dt_node() error path. ("powerpc/pseries/mobility: refactor node lookup during DT update")
Nathan Lynch (28):
powerpc/rtas: prevent suspend-related sys_rtas use on LE powerpc/rtas: complete ibm,suspend-me status codes powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe powerpc/rtas: add rtas_ibm_suspend_me()
powerpc/rtas: add rtas_activate_firmware()
powerpc/hvcall: add token and codes for H_VASI_SIGNAL powerpc/pseries/mobility: don't error on absence of ibm,update-nodes powerpc/pseries/mobility: add missing break to default case powerpc/pseries/mobility: error message improvements powerpc/pseries/mobility: use rtas_activate_firmware() on resume powerpc/pseries/mobility: extract VASI session polling logic powerpc/pseries/mobility: use stop_machine for join/suspend powerpc/pseries/mobility: signal suspend cancellation to platform powerpc/pseries/mobility: retry partition suspend after error powerpc/rtas: dispatch partition migration requests to pseries powerpc/rtas: remove rtas_ibm_suspend_me_unsafe() powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend
ops
powerpc/pseries/hibernation: pass stream id via function arguments powerpc/pseries/hibernation: remove pseries_suspend_cpu() powerpc/machdep: remove suspend_disable_cpu() powerpc/rtas: remove rtas_suspend_cpu() powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me() powerpc/rtas: remove unused rtas_suspend_last_cpu() powerpc/pseries/hibernation: remove redundant cacheinfo update powerpc/pseries/hibernation: perform post-suspend fixups later powerpc/pseries/hibernation: remove prepare_late() callback powerpc/rtas: remove unused rtas_suspend_me_data powerpc/pseries/mobility: refactor node lookup during DT update
arch/powerpc/include/asm/hvcall.h | 9 + arch/powerpc/include/asm/machdep.h | 1 - arch/powerpc/include/asm/rtas-types.h | 8 - arch/powerpc/include/asm/rtas.h | 17 +- arch/powerpc/kernel/rtas.c | 243 ++++++--------- arch/powerpc/platforms/pseries/mobility.c | 358 ++++++++++++++++++---- arch/powerpc/platforms/pseries/suspend.c | 79 +---- 7 files changed, 415 insertions(+), 300 deletions(-)
Signature · 1 line
2.28.0