qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 871cfc: ram: Add public helper to set colo bi


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 871cfc: ram: Add public helper to set colo bitmap
Date: Thu, 11 May 2023 00:58:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 871cfc540014bb2292d79ce4348484a3dbb33034
      
https://github.com/qemu/qemu/commit/871cfc540014bb2292d79ce4348484a3dbb33034
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  ram: Add public helper to set colo bitmap

The overhead of the mutex in non-multifd mode is negligible,
because in that case its just the single thread taking the mutex.

This will be used in the next commits to add colo support to multifd.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: 
<22d83cb428f37929563155531bfb69fd8953cc61.1683572883.git.lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 9d638407efa44153c5269f04e5010b105f5daac9
      
https://github.com/qemu/qemu/commit/9d638407efa44153c5269f04e5010b105f5daac9
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram: Let colo_flush_ram_cache take the bitmap_mutex

This is not required, colo_flush_ram_cache does not run concurrently
with the multifd threads since the cache is only flushed after
everything has been received. But it makes me more comfortable.

This will be used in the next commits to add colo support to multifd.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: 
<35cb23ba854151d38a31e3a5c8a1020e4283cb4a.1683572883.git.lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 5d1d1fcf43ac54993d527612fccf9521c8608ae1
      
https://github.com/qemu/qemu/commit/5d1d1fcf43ac54993d527612fccf9521c8608ae1
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/multifd.c
    M migration/multifd.h

  Log Message:
  -----------
  multifd: Add the ramblock to MultiFDRecvParams

This will be used in the next commits to add colo support to multifd.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: 
<88135197411df1a71d7832962b39abf60faf0021.1683572883.git.lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 43c71fe3b846222154a99a02b17818fe54c1edaf
      
https://github.com/qemu/qemu/commit/43c71fe3b846222154a99a02b17818fe54c1edaf
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/meson.build

  Log Message:
  -----------
  block/meson.build: prefer positive condition for replication

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 4332ffcd7b21f7391fef1d916e1e3cd5b4bdd268
      
https://github.com/qemu/qemu/commit/4332ffcd7b21f7391fef1d916e1e3cd5b4bdd268
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M include/migration/colo.h
    M migration/colo.c
    M migration/options.c

  Log Message:
  -----------
  colo: make colo_checkpoint_notify static and provide simpler API

colo_checkpoint_notify() is mostly used in colo.c. Outside we use it
once when x-checkpoint-delay migration parameter is set. So, let's
simplify the external API to only that function - notify COLO that
parameter was set. This make external API more robust and hides
implementation details from external callers. Also this helps us to
make COLO module optional in further patch (i.e. we are going to add
possibility not build the COLO module).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-3-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 51e47cf8600dab5beedd7fa369ffd645868672ec
      
https://github.com/qemu/qemu/commit/51e47cf8600dab5beedd7fa369ffd645868672ec
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M hmp-commands.hx
    M migration/colo.c
    M migration/meson.build
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M qapi/migration.json
    A stubs/colo.c
    M stubs/meson.build

  Log Message:
  -----------
  build: move COLO under CONFIG_REPLICATION

We don't allow to use x-colo capability when replication is not
configured. So, no reason to build COLO when replication is disabled,
it's unusable in this case.

Note also that the check in migrate_caps_check() is not the only
restriction: some functions in migration/colo.c will just abort if
called with not defined CONFIG_REPLICATION, for example:

    migration_iteration_finish()
       case MIGRATION_STATUS_COLO:
           migrate_start_colo_process()
               colo_process_checkpoint()
                   abort()

It could probably make sense to have possibility to enable COLO without
REPLICATION, but this requires deeper audit of colo & replication code,
which may be done later if needed.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Acked-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230428194928.1426370-4-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 1d4cfcd4091bc6567ba759881f98726c808f7490
      
https://github.com/qemu/qemu/commit/1d4cfcd4091bc6567ba759881f98726c808f7490
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/migration.c
    M migration/migration.h

  Log Message:
  -----------
  migration: drop colo_incoming_thread from MigrationIncomingState

have_colo_incoming_thread variable is unused. colo_incoming_thread can
be local.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-6-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: ecbfec6d7769b5362feac92404d564622198bf85
      
https://github.com/qemu/qemu/commit/ecbfec6d7769b5362feac92404d564622198bf85
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: process_incoming_migration_co: simplify code flow around ret

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-7-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: d70178a88fe8d0873508f6d4757018092262e9ec
      
https://github.com/qemu/qemu/commit/d70178a88fe8d0873508f6d4757018092262e9ec
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/migration.c
    M migration/options.c

  Log Message:
  -----------
  migration: disallow change capabilities in COLO state

COLO is not listed as running state in migrate_is_running(), so, it's
theoretically possible to disable colo capability in COLO state and the
unexpected error in migration_iteration_finish() is reachable.

Let's disallow that in qmp_migrate_set_capabilities. Than the error
becomes absolutely unreachable: we can get into COLO state only with
enabled capability and can't disable it while we are in COLO state. So
substitute the error by simple assertion.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230428194928.1426370-10-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 121ccedc2bf0c124e93991275336415d12d2e3df
      
https://github.com/qemu/qemu/commit/121ccedc2bf0c124e93991275336415d12d2e3df
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M docs/COLO-FT.txt
    M migration/migration.c

  Log Message:
  -----------
  migration: block incoming colo when capability is disabled

We generally require same set of capabilities on source and target.
Let's require x-colo capability to use COLO on target.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-11-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: fff86d48a2cdcdfa75f845cac3e0d3cdd848d9e4
      
https://github.com/qemu/qemu/commit/fff86d48a2cdcdfa75f845cac3e0d3cdd848d9e4
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-11 (Thu, 11 May 2023)

  Changed paths:
    M block/meson.build
    M docs/COLO-FT.txt
    M hmp-commands.hx
    M include/migration/colo.h
    M migration/colo.c
    M migration/meson.build
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h
    M migration/multifd.c
    M migration/multifd.h
    M migration/options.c
    M migration/ram.c
    M migration/ram.h
    M qapi/migration.json
    A stubs/colo.c
    M stubs/meson.build

  Log Message:
  -----------
  Merge tag 'migration-20230509-pull-request' of 
https://gitlab.com/juan.quintela/qemu into staging

Migration Pull request (20230509 vintage) take 2

Hi

In this take 2:
- Change uint -> uint32_t to fix mingw32 compilation.

Please apply.
[take 1]
In this PULL request:
- 1st part of colo support for multifd (lukas)
- 1st part of disabling colo option (vladimir)

Please, apply.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmRb3dgACgkQ9IfvGFhy
# 1yNLBxAAwHiAOdSPS7TqJXH2/PkBKsd42XMtWzC9UowZ6SUdQi0Q2bQUBnygJ8BA
# 59yLOTPdwUhaPWk4KsyKM2znOCJ+f9MF5V4QXbyILf1WCAq6d+mtPwArnYF1TRwi
# XIewVDeRopdOO5lnWGcfAKZZ5WIDzA/bn6NiGLi+pQa5HGyk84Bk+tFa8kJI6xBL
# 5CWfhNTcxDNYRFg/z/9YVirkuxIXEEL6VEeRFV+pmFuj05q9bysWJkLFoEcFNawO
# gp1foHDkU7wHmHDJ3D4AVTm3TW641ft1wdlHIHZRoOiIIu3EUOoDEVVsaCfdxrY8
# pPJZ5m37wb52GIaCJmigG8rkHxIJ8xKLk4HKu4umDqFq5jZQ2krnnj7AkQhpp7p2
# aEIOXJQQq7XCsKpuvSUIexPv4gbN5SEYKi7XKoOPe3sZ03Rkn0I5xY3KSyMQMamP
# jtk8tNlRA+9Wug82eb/FtIKDj3//4SbuQOJEdRXjKJBldd3mtWTT/FRj/8oo96/p
# hmTu/cGDrP5qgtWpz0kKI/xaBf8at1nwpDgdEzOjRw4zf6xQHFjbXgJ7tQBH/JUI
# T3A9pdiXN6QdRupcWUSV0iJsfS/5i3mOUTA/C529qGXabSnZzfMK+unL/I8N02yt
# 83o7jSg22etMjaS1c+VuDmzKCAfuZloDZv2Bms/+yM/8k8Xe5S4=
# =vbqf
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 10 May 2023 07:09:28 PM BST
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [undefined]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* tag 'migration-20230509-pull-request' of 
https://gitlab.com/juan.quintela/qemu:
  migration: block incoming colo when capability is disabled
  migration: disallow change capabilities in COLO state
  migration: process_incoming_migration_co: simplify code flow around ret
  migration: drop colo_incoming_thread from MigrationIncomingState
  build: move COLO under CONFIG_REPLICATION
  colo: make colo_checkpoint_notify static and provide simpler API
  block/meson.build: prefer positive condition for replication
  multifd: Add the ramblock to MultiFDRecvParams
  ram: Let colo_flush_ram_cache take the bitmap_mutex
  ram: Add public helper to set colo bitmap

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/d530697ca20e...fff86d48a2cd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]