[PULL 00/38] Migration 20220127 patches

Juan Quintela posted 38 patches 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220127150548.20595-1-quintela@redhat.com
Maintainers: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Fam Zheng <fam@euphon.net>, Alistair Francis <alistair@alistair23.me>, Andrew Baumann <Andrew.Baumann@microsoft.com>, "Michael S. Tsirkin" <mst@redhat.com>, Vikram Garhwal <fnu.vikram@xilinx.com>, Aurelien Jarno <aurelien@aurel32.net>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Paolo Bonzini <pbonzini@redhat.com>, Stafford Horne <shorne@gmail.com>, Juan Quintela <quintela@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Pavel Pisa <pisa@cmp.felk.cvut.cz>, Laurent Vivier <laurent@vivier.eu>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>, Ani Sinha <ani@anisinha.ca>, Greg Kurz <groug@kaod.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Hannes Reinecke <hare@suse.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Jason Wang <jasowang@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, Igor Mammedov <imammedo@redhat.com>
qapi/migration.json           |  13 +-
include/migration/vmstate.h   |   7 +-
migration/multifd.h           |  33 ++--
migration/ram.h               |   4 +-
hw/acpi/cpu.c                 |   2 -
hw/acpi/ich9.c                |   3 -
hw/acpi/memory_hotplug.c      |   2 -
hw/acpi/piix4.c               |   2 -
hw/acpi/tco.c                 |   1 -
hw/audio/pcspk.c              |   1 -
hw/display/macfb.c            |   1 -
hw/dma/xlnx-zdma.c            |   1 -
hw/dma/xlnx_csu_dma.c         |   1 -
hw/gpio/imx_gpio.c            |   1 -
hw/misc/bcm2835_mbox.c        |   1 -
hw/net/can/can_kvaser_pci.c   |   1 -
hw/net/can/can_mioe3680_pci.c |   1 -
hw/net/can/can_pcm3680_pci.c  |   1 -
hw/net/can/can_sja1000.c      |   2 -
hw/net/can/ctucan_core.c      |   2 -
hw/net/can/ctucan_pci.c       |   1 -
hw/ppc/ppc.c                  |   1 -
hw/scsi/megasas.c             |   1 -
hw/scsi/mptsas.c              |   1 -
hw/virtio/virtio-mmio.c       |   1 -
hw/virtio/virtio-pci.c        |   1 -
hw/virtio/virtio.c            |   1 -
migration/migration.c         |  26 ++-
migration/multifd-zlib.c      |  61 +++----
migration/multifd-zstd.c      |  63 +++-----
migration/multifd.c           | 148 ++++++++---------
migration/postcopy-ram.c      |  96 ++++++-----
migration/ram.c               | 291 ++++++++++++----------------------
migration/savevm.c            |  45 +++++-
migration/vmstate.c           |   2 +
monitor/hmp-cmds.c            |  12 ++
target/openrisc/machine.c     |   1 -
target/ppc/machine.c          |   2 -
target/sparc/machine.c        |   4 -
migration/trace-events        |  29 ++--
40 files changed, 398 insertions(+), 469 deletions(-)
[PULL 00/38] Migration 20220127 patches
Posted by Juan Quintela 2 years, 2 months ago
The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3:

  Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging (2022-01-26 10:59:50 +0000)

are available in the Git repository at:

  https://gitlab.com/juan.quintela/qemu.git tags/migration-20220127-pull-request

for you to fetch changes up to 4e29a822de430e8d0d8bf5c61aaff0561a713d84:

  migration: Move temp page setup and cleanup into separate functions (2022-01-27 13:37:55 +0100)

----------------------------------------------------------------
Migration Pull request

Hi

This pull request includes every patch ack'd on the list for migration.  In no particular order:

- ram_transferred_add() - (Edmondson)
- vmstate canary (dgilbert)
- minimum_version_id_old removal (peter maydell)
- postcopy cleanups (peter xu)
- more cleanups (Philippe)
- yet more cleanups (zheng)
- colo and cleanups (zhang)

Please, Apply.

----------------------------------------------------------------

David Edmondson (3):
  migration: Report the error returned when save_live_iterate fails
  migration: Introduce ram_transferred_add()
  migration: Tally pre-copy, downtime and post-copy bytes independently

Dr. David Alan Gilbert (2):
  migration: Add canary to VMSTATE_END_OF_LIST
  migration: Perform vmsd structure check during tests

Juan Quintela (17):
  migration: All this fields are unsigned
  migration: We only need last_stage in two places
  migration: ram_release_pages() always receive 1 page as argument
  migration: Remove masking for compression
  migration: simplify do_compress_ram_page
  migration: Move ram_release_pages() call to save_zero_page_to_file()
  multifd: Use proper maximum compression values
  multifd: Move iov from pages to params
  multifd: Make zlib use iov's
  multifd: Make zstd use iov's
  multifd: Remove send_write() method
  multifd: Use a single writev on the send side
  multifd: Unfold "used" variable by its value
  multifd: Use normal pages array on the send side
  multifd: Use normal pages array on the recv side
  multifd: recv side only needs the RAMBlock host address
  multifd: Rename pages_used to normal_pages

Peter Maydell (1):
  Remove unnecessary minimum_version_id_old fields

Peter Xu (10):
  migration: Drop dead code of ram_debug_dump_bitmap()
  migration: Don't return for postcopy_chunk_hostpages()
  migration: Drop postcopy_chunk_hostpages()
  migration: Do chunk page in postcopy_each_ram_send_discard()
  migration: Drop return code for disgard ram process
  migration: No off-by-one for pss->page update in host page size
  migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat
  migration: Add postcopy_has_request()
  migration: Simplify unqueue_page()
  migration: Move temp page setup and cleanup into separate functions

Philippe Mathieu-Daudé (1):
  migration: Don't return for postcopy_send_discard_bm_ram()

Xu Zheng (1):
  migration/ram: clean up unused comment.

Zhang Chen (3):
  migration/migration.c: Add missed default error handler for migration
    state
  migration/migration.c: Avoid COLO boot in postcopy migration
  migration/migration.c: Remove the MIGRATION_STATUS_ACTIVE when
    migration finished

 qapi/migration.json           |  13 +-
 include/migration/vmstate.h   |   7 +-
 migration/multifd.h           |  33 ++--
 migration/ram.h               |   4 +-
 hw/acpi/cpu.c                 |   2 -
 hw/acpi/ich9.c                |   3 -
 hw/acpi/memory_hotplug.c      |   2 -
 hw/acpi/piix4.c               |   2 -
 hw/acpi/tco.c                 |   1 -
 hw/audio/pcspk.c              |   1 -
 hw/display/macfb.c            |   1 -
 hw/dma/xlnx-zdma.c            |   1 -
 hw/dma/xlnx_csu_dma.c         |   1 -
 hw/gpio/imx_gpio.c            |   1 -
 hw/misc/bcm2835_mbox.c        |   1 -
 hw/net/can/can_kvaser_pci.c   |   1 -
 hw/net/can/can_mioe3680_pci.c |   1 -
 hw/net/can/can_pcm3680_pci.c  |   1 -
 hw/net/can/can_sja1000.c      |   2 -
 hw/net/can/ctucan_core.c      |   2 -
 hw/net/can/ctucan_pci.c       |   1 -
 hw/ppc/ppc.c                  |   1 -
 hw/scsi/megasas.c             |   1 -
 hw/scsi/mptsas.c              |   1 -
 hw/virtio/virtio-mmio.c       |   1 -
 hw/virtio/virtio-pci.c        |   1 -
 hw/virtio/virtio.c            |   1 -
 migration/migration.c         |  26 ++-
 migration/multifd-zlib.c      |  61 +++----
 migration/multifd-zstd.c      |  63 +++-----
 migration/multifd.c           | 148 ++++++++---------
 migration/postcopy-ram.c      |  96 ++++++-----
 migration/ram.c               | 291 ++++++++++++----------------------
 migration/savevm.c            |  45 +++++-
 migration/vmstate.c           |   2 +
 monitor/hmp-cmds.c            |  12 ++
 target/openrisc/machine.c     |   1 -
 target/ppc/machine.c          |   2 -
 target/sparc/machine.c        |   4 -
 migration/trace-events        |  29 ++--
 40 files changed, 398 insertions(+), 469 deletions(-)

-- 
2.34.1



Re: [PULL 00/38] Migration 20220127 patches
Posted by Peter Maydell 2 years, 2 months ago
On Thu, 27 Jan 2022 at 15:06, Juan Quintela <quintela@redhat.com> wrote:
>
> The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3:
>
>   Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging (2022-01-26 10:59:50 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/juan.quintela/qemu.git tags/migration-20220127-pull-request
>
> for you to fetch changes up to 4e29a822de430e8d0d8bf5c61aaff0561a713d84:
>
>   migration: Move temp page setup and cleanup into separate functions (2022-01-27 13:37:55 +0100)
>
> ----------------------------------------------------------------
> Migration Pull request
>
> Hi
>
> This pull request includes every patch ack'd on the list for migration.  In no particular order:
>
> - ram_transferred_add() - (Edmondson)
> - vmstate canary (dgilbert)
> - minimum_version_id_old removal (peter maydell)
> - postcopy cleanups (peter xu)
> - more cleanups (Philippe)
> - yet more cleanups (zheng)
> - colo and cleanups (zhang)

Hi; this fails because we hit this assert in the vmstate canary check
on some of the CI jobs, for instance:
https://gitlab.com/qemu-project/qemu/-/jobs/2024872142
and also on the NetBSD VM in tests/vm.

thanks
-- PMM

Re: [PULL 00/38] Migration 20220127 patches
Posted by Juan Quintela 2 years, 2 months ago
Peter Maydell <peter.maydell@linaro.org> wrote:
> On Thu, 27 Jan 2022 at 15:06, Juan Quintela <quintela@redhat.com> wrote:
>>
>> The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3:
>>
>>   Merge remote-tracking branch
>> 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging
>> (2022-01-26 10:59:50 +0000)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/juan.quintela/qemu.git tags/migration-20220127-pull-request
>>
>> for you to fetch changes up to 4e29a822de430e8d0d8bf5c61aaff0561a713d84:
>>
>>   migration: Move temp page setup and cleanup into separate functions (2022-01-27 13:37:55 +0100)
>>
>> ----------------------------------------------------------------
>> Migration Pull request
>>
>> Hi
>>
>> This pull request includes every patch ack'd on the list for migration.  In no particular order:
>>
>> - ram_transferred_add() - (Edmondson)
>> - vmstate canary (dgilbert)
>> - minimum_version_id_old removal (peter maydell)
>> - postcopy cleanups (peter xu)
>> - more cleanups (Philippe)
>> - yet more cleanups (zheng)
>> - colo and cleanups (zhang)
>
> Hi; this fails because we hit this assert in the vmstate canary check
> on some of the CI jobs, for instance:
> https://gitlab.com/qemu-project/qemu/-/jobs/2024872142
> and also on the NetBSD VM in tests/vm.

I dropped them on my PULL request, but there is something fishy on
aarch64 for migration.  It makes exactly zero sense to fail with this
patch.  Or something is missing a VMSTATE_END that only happens on
aarch64.

I will take a look.

Later, Juan.

PD.  As Dave said, the patch makes sense to drop because we need a new
libslirp before pushing for it.