From: Nathan Lynch <nathanl@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: tyreld@linux.ibm.com, ajd@linux.ibm.com, mmc@linux.vnet.ibm.com,
cforno12@linux.vnet.ibm.com, drt@linux.vnet.ibm.com,
brking@linux.ibm.com
Subject: [PATCH v2 00/28] partition suspend updates
Date: Mon, 7 Dec 2020 15:51:32 -0600 [thread overview]
Message-ID: <20201207215200.1785968-1-nathanl@linux.ibm.com> (raw)
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(-)
--
2.28.0
next reply other threads:[~2020-12-07 21:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 21:51 Nathan Lynch [this message]
2020-12-07 21:51 ` [PATCH v2 01/28] powerpc/rtas: prevent suspend-related sys_rtas use on LE Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 02/28] powerpc/rtas: complete ibm,suspend-me status codes Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 03/28] powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 04/28] powerpc/rtas: add rtas_ibm_suspend_me() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 05/28] powerpc/rtas: add rtas_activate_firmware() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 06/28] powerpc/hvcall: add token and codes for H_VASI_SIGNAL Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 07/28] powerpc/pseries/mobility: don't error on absence of ibm, update-nodes Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 08/28] powerpc/pseries/mobility: add missing break to default case Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 09/28] powerpc/pseries/mobility: error message improvements Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 10/28] powerpc/pseries/mobility: use rtas_activate_firmware() on resume Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 11/28] powerpc/pseries/mobility: extract VASI session polling logic Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 12/28] powerpc/pseries/mobility: use stop_machine for join/suspend Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 13/28] powerpc/pseries/mobility: signal suspend cancellation to platform Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 14/28] powerpc/pseries/mobility: retry partition suspend after error Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 15/28] powerpc/rtas: dispatch partition migration requests to pseries Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 16/28] powerpc/rtas: remove rtas_ibm_suspend_me_unsafe() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 17/28] powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 18/28] powerpc/pseries/hibernation: pass stream id via function arguments Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 19/28] powerpc/pseries/hibernation: remove pseries_suspend_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 20/28] powerpc/machdep: remove suspend_disable_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 21/28] powerpc/rtas: remove rtas_suspend_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 22/28] powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 23/28] powerpc/rtas: remove unused rtas_suspend_last_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 24/28] powerpc/pseries/hibernation: remove redundant cacheinfo update Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 25/28] powerpc/pseries/hibernation: perform post-suspend fixups later Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 26/28] powerpc/pseries/hibernation: remove prepare_late() callback Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 27/28] powerpc/rtas: remove unused rtas_suspend_me_data Nathan Lynch
2020-12-07 21:52 ` [PATCH v2 28/28] powerpc/pseries/mobility: refactor node lookup during DT update Nathan Lynch
2020-12-15 10:49 ` [PATCH v2 00/28] partition suspend updates Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207215200.1785968-1-nathanl@linux.ibm.com \
--to=nathanl@linux.ibm.com \
--cc=ajd@linux.ibm.com \
--cc=brking@linux.ibm.com \
--cc=cforno12@linux.vnet.ibm.com \
--cc=drt@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mmc@linux.vnet.ibm.com \
--cc=tyreld@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.