[PATCH 00/43] Migration: Create options.c for capabilities/params/properties

Juan Quintela posted 43 patches 1 year ago
Failed in applying to current master (apply log)
There is a newer version of this series
migration/migration.h          |   44 +-
migration/options.h            |  108 +++
hw/virtio/virtio-balloon.c     |    1 +
migration/block-dirty-bitmap.c |   15 +-
migration/block.c              |    5 +-
migration/colo.c               |    6 +-
migration/migration.c          | 1325 +-------------------------------
migration/multifd-zlib.c       |    1 +
migration/multifd-zstd.c       |    1 +
migration/multifd.c            |   24 +-
migration/options.c            | 1318 +++++++++++++++++++++++++++++++
migration/postcopy-ram.c       |    1 +
migration/ram.c                |   43 +-
migration/rdma.c               |    6 +-
migration/savevm.c             |    9 +-
migration/socket.c             |    5 +-
migration/tls.c                |   23 +-
migration/meson.build          |    1 +
18 files changed, 1529 insertions(+), 1407 deletions(-)
create mode 100644 migration/options.h
create mode 100644 migration/options.c
[PATCH 00/43] Migration: Create options.c for capabilities/params/properties
Posted by Juan Quintela 1 year ago
Hi

This series move to options.c:
- all migration capabilities code
- all migration parameters code
- all properties code
- all qmp commands that only touch the previous

And once there:
- sort of functions
- make consistent and coherent all the functions naming/typing
- create accessors for the parameters/capabilties that don't exist
- more cleanups here and there.

Todo:

- There is still capabilities code on savevm.c, but I want this in
  before moving that code to options.c, but still needs more thought
  for my part. I.e. should I put vmstate sections in options.c, or
  should I create new functions to access the capabilities in savevm.c.

Please review.

Juan Quintela (43):
  migration: rename enabled_capabilities to capabilities
  migration: Pass migrate_caps_check() the old and new caps
  migration: Create migration_cap_set()
  migration: create options.c
  migration: Move migrate_colo_enabled() to options.c
  migration: Move migrate_use_compression() to options.c
  migration: Move migrate_use_events() to options.c
  migration: Move migrate_use_multifd() to options.c
  migration: Move migrate_use_zero_copy_send() to options.c
  migration: Move migrate_use_xbzrle() to options.c
  migration: Move migrate_use_block() to options.c
  migration: Move migrate_use_return() to options.c
  migration: Create migrate_rdma_pin_all() function
  migration: Move migrate_caps_check() to options.c
  migration: Move qmp_query_migrate_capabilities() to options.c
  migration: Move qmp_migrate_set_capabilities() to options.c
  migration: Move migrate_cap_set() to options.c
  migration: Move parameters functions to option.c
  migration: Use migrate_max_postcopy_bandwidth()
  migration: Move migrate_use_block_incremental() to option.c
  migration: Create migrate_throttle_trigger_threshold()
  migration: Create migrate_checkpoint_delay()
  migration: Create migrate_max_cpu_throttle()
  migration: Move migrate_announce_params() to option.c
  migration: Create  migrate_cpu_throttle_initial() to option.c
  migration: Create migrate_cpu_throttle_increment() function
  migration: Create migrate_cpu_throttle_tailslow() function
  migration: Move migrate_use_tls() to options.c
  migration: Move migrate_postcopy() to options.c
  migration: Create migrate_max_bandwidth() function
  migration: Move qmp_query_migrate_parameters() to options.c
  migration: Move qmp_migrate_set_parameters() to options.c
  migration: Create migrate_params_init() function
  migration: Make all functions check have the same format
  migration: Create migrate_downtime_limit() function
  migration: Move migrate_set_block_incremental() to options.c
  migration: Move block_cleanup_parameters() to options.c
  migration: Remove MigrationState from block_cleanup_parameters()
  migration: Create migrate_tls_creds() function
  migration: Create migrate_tls_authz() function
  migration: Create migrate_tls_hostname() function
  migration: Create migrate_block_bitmap_mapping() function
  migration: Move migration_properties to options.c

 migration/migration.h          |   44 +-
 migration/options.h            |  108 +++
 hw/virtio/virtio-balloon.c     |    1 +
 migration/block-dirty-bitmap.c |   15 +-
 migration/block.c              |    5 +-
 migration/colo.c               |    6 +-
 migration/migration.c          | 1325 +-------------------------------
 migration/multifd-zlib.c       |    1 +
 migration/multifd-zstd.c       |    1 +
 migration/multifd.c            |   24 +-
 migration/options.c            | 1318 +++++++++++++++++++++++++++++++
 migration/postcopy-ram.c       |    1 +
 migration/ram.c                |   43 +-
 migration/rdma.c               |    6 +-
 migration/savevm.c             |    9 +-
 migration/socket.c             |    5 +-
 migration/tls.c                |   23 +-
 migration/meson.build          |    1 +
 18 files changed, 1529 insertions(+), 1407 deletions(-)
 create mode 100644 migration/options.h
 create mode 100644 migration/options.c

-- 
2.39.2
Re: [PATCH 00/43] Migration: Create options.c for capabilities/params/properties
Posted by Vladimir Sementsov-Ogievskiy 1 year ago
On 02.03.23 19:33, Juan Quintela wrote:
> Hi
> 
> This series move to options.c:
> - all migration capabilities code
> - all migration parameters code
> - all properties code
> - all qmp commands that only touch the previous
> 
> And once there:
> - sort of functions
> - make consistent and coherent all the functions naming/typing
> - create accessors for the parameters/capabilties that don't exist
> - more cleanups here and there.
> 
> Todo:
> 
> - There is still capabilities code on savevm.c, but I want this in
>    before moving that code to options.c, but still needs more thought
>    for my part. I.e. should I put vmstate sections in options.c, or
>    should I create new functions to access the capabilities in savevm.c.
> 
> Please review.

Hmm, I can't apply to current master, neither can patchew: https://patchew.org/QEMU/20230302163410.11399-1-quintela@redhat.com/

On which commit the series based on?

-- 
Best regards,
Vladimir
Re: [PATCH 00/43] Migration: Create options.c for capabilities/params/properties
Posted by Juan Quintela 11 months, 1 week ago
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> wrote:
> On 02.03.23 19:33, Juan Quintela wrote:
>> Hi
>> This series move to options.c:
>> - all migration capabilities code
>> - all migration parameters code
>> - all properties code
>> - all qmp commands that only touch the previous
>> And once there:
>> - sort of functions
>> - make consistent and coherent all the functions naming/typing
>> - create accessors for the parameters/capabilties that don't exist
>> - more cleanups here and there.
>> Todo:
>> - There is still capabilities code on savevm.c, but I want this in
>>    before moving that code to options.c, but still needs more thought
>>    for my part. I.e. should I put vmstate sections in options.c, or
>>    should I create new functions to access the capabilities in savevm.c.
>> Please review.
>
> Hmm, I can't apply to current master, neither can patchew:
> https://patchew.org/QEMU/20230302163410.11399-1-quintela@redhat.com/
>
> On which commit the series based on?

It was on top of my spice changes O:-)
But I sent a new version right now on top of the PULL request.

Thanks, Juan.