qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration
@ 2023-05-19  9:46 Het Gala
  2023-05-19  9:46 ` [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol Het Gala
                   ` (8 more replies)
  0 siblings, 9 replies; 31+ messages in thread
From: Het Gala @ 2023-05-19  9:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: prerna.saxena, quintela, dgilbert, pbonzini, berrange, armbru,
	eblake, manish.mishra, aravind.retnakaran, Het Gala

This is v5 patchset of modified 'migrate' and 'migrate-incoming' QAPI design
for upstream review.

Would like to thank all the maintainers that actively participated in the v4
patchset discussion and gave insightful suggestions to improve the patches.

Link to previous upstream community patchset links:
v1: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04339.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02106.html
v3: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02473.html
v4: https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg03064.html

v4 -> v5 changelog:
-------------------
- Improved majorly on cleanly freeing objects across the patches by using
  g_auto(), g_autoptr(), gnew0() macros wherever necessary and preventing
  unecessary use goto statements.
- Simplified error statement propogation in migration code flow.
- qapi: changed version form 8.0 -> 8.1
- For HMP commands, decided to keep using URI syntax forever, so depricated
  implementation of migrate_channel_from_qdict() for converting URI ->
  MigrateChannel struct, as "char *uri" is already getting converted into
  modified struct using another API in the workflow.
- Additional tcp test case for multifd with modified QAPI syntax in qtests.


Abstract:
---------

Current QAPI 'migrate' command design (for initiating a migration
stream) contains information regarding different migrate transport mechanism
(tcp / unix / exec), dest-host IP address, and binding port number in form of
a string. Thus the design does seem to have some design issues. Some of the
issues, stated below are:

1. Use of string URIs is a data encoding scheme within a data encoding scheme.
   QEMU code should directly be able to work with the results from QAPI,
   without resorting to do a second level of parsing (eg. socket_parse()).
2. For features / parameters related to migration, the migration tunables needs
   to be defined and updated upfront. For example, 'migrate-set-capability'
   and 'migrate-set-parameter' is required to enable multifd capability and
   multifd-number of channels respectively. Instead, 'Multifd-channels' can
   directly be represented as a single additional parameter to 'migrate'
   QAPI. 'migrate-set-capability' and 'migrate-set-parameter' commands could
   be used for runtime tunables that need setting after migration has already
   started.

The current patchset focuses on solving the first problem of multi-level
encoding of URIs. The patch defines 'migrate' command as a QAPI discriminated
union for the various transport backends (like socket, exec and rdma), and on
basis of transport backends, different migration parameters are defined.

(uri) string -->  (channel) Channel-type
                            Transport-type
                            Migration parameters based on transport type
------------------------------------------------------------------------------
Het Gala (9):
  migration: introduced 'MigrateAddress' in QAPI for migration wire
    protocol.
  migration: convert uri parameter into 'MigrateAddress' struct
  migration: convert socket backend to accept MigrateAddress struct
  migration: convert rdma backend to accept MigrateAddress struct
  migration: convert exec backend to accept MigrateAddress struct.
  migration: modified migration QAPIs to accept 'channels' argument for
    migration
  migration: modify migration_channels_and_uri_compatible() to
    incorporate newer migration QAPI syntax
  migration: Introduced MigrateChannelList struct to migration code
    flow.
  migration: adding test case for modified QAPI syntax

 migration/exec.c               |  62 ++++++++---
 migration/exec.h               |   8 +-
 migration/migration-hmp-cmds.c |  16 ++-
 migration/migration.c          | 183 ++++++++++++++++++++++++++-------
 migration/rdma.c               |  34 +++---
 migration/rdma.h               |   6 +-
 migration/socket.c             |  39 ++-----
 migration/socket.h             |   7 +-
 qapi/migration.json            | 145 +++++++++++++++++++++++++-
 softmmu/vl.c                   |   2 +-
 tests/qtest/migration-test.c   |  47 +++++++++
 11 files changed, 426 insertions(+), 123 deletions(-)

-- 
2.22.3



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-06-01  8:57 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19  9:46 [PATCH v5 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration Het Gala
2023-05-19  9:46 ` [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol Het Gala
2023-05-25 17:34   ` Markus Armbruster
2023-05-29  9:37     ` Het Gala
2023-05-30  6:58       ` Markus Armbruster
2023-05-30  7:32         ` Het Gala
2023-05-30  7:56           ` Markus Armbruster
2023-05-30  8:56             ` Het Gala
2023-05-30 10:34               ` Daniel P. Berrangé
2023-05-30  8:57           ` Daniel P. Berrangé
2023-05-30  9:02             ` Het Gala
2023-05-30 11:38           ` Het Gala
2023-05-30 12:10           ` Daniel P. Berrangé
2023-06-01  8:56             ` Het Gala
2023-05-19  9:46 ` [PATCH v5 2/9] migration: convert uri parameter into 'MigrateAddress' struct Het Gala
2023-05-19  9:46 ` [PATCH v5 3/9] migration: convert socket backend to accept MigrateAddress struct Het Gala
2023-05-19  9:46 ` [PATCH v5 4/9] migration: convert rdma " Het Gala
2023-05-19  9:46 ` [PATCH v5 5/9] migration: convert exec " Het Gala
2023-05-19  9:52   ` Het Gala
2023-05-19  9:46 ` [PATCH v5 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration Het Gala
2023-05-25 17:50   ` Markus Armbruster
2023-05-29 11:33     ` Het Gala
2023-05-30  7:13       ` Markus Armbruster
2023-05-30  8:45         ` Het Gala
2023-05-30  9:17           ` Markus Armbruster
2023-05-19  9:46 ` [PATCH v5 7/9] migration: modify migration_channels_and_uri_compatible() to incorporate newer migration QAPI syntax Het Gala
2023-05-19  9:46 ` [PATCH v5 8/9] migration: Introduced MigrateChannelList struct to migration code flow Het Gala
2023-05-25 18:02   ` Markus Armbruster
2023-05-29 11:35     ` Het Gala
2023-05-19  9:46 ` [PATCH v5 9/9] migration: adding test case for modified QAPI syntax Het Gala
2023-05-19  9:49   ` Het Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).