qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 04e114: migration: All this fields are unsign


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 04e114: migration: All this fields are unsigned
Date: Sun, 30 Jan 2022 02:00:17 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 04e114049406dbb69fc9043c795ddd28fdba31a6
      
https://github.com/qemu/qemu/commit/04e114049406dbb69fc9043c795ddd28fdba31a6
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/trace-events

  Log Message:
  -----------
  migration: All this fields are unsigned

So printing it as %d is wrong.  Notice that for the channel id, that
is an uint8_t, but I changed it anyways for consistency.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>


  Commit: 05931ec561a83a6054d0658ed2b9570f5175728a
      
https://github.com/qemu/qemu/commit/05931ec561a83a6054d0658ed2b9570f5175728a
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: We only need last_stage in two places

We only need last_stage in two places and we are passing it all
around.  Just add a field to RAMState that passes it.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>

---

Repeat subject (philmd suggestion)


  Commit: 0189c722917ce3626e21bcad675871228626d61b
      
https://github.com/qemu/qemu/commit/0189c722917ce3626e21bcad675871228626d61b
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: ram_release_pages() always receive 1 page as argument

Remove the pages argument. And s/pages/page/

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>

---

- Use 1LL instead of casts (philmd)
- Change the whole 1ULL for TARGET_PAGE_SIZE


  Commit: 20d549cb0b6c8a9df8690d8e97505aa785036472
      
https://github.com/qemu/qemu/commit/20d549cb0b6c8a9df8690d8e97505aa785036472
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Remove masking for compression

Remove the mask in the call to ram_release_pages().  Nothing else does
it, and if the offset has that bits set, we have a lot of trouble.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: e7f2e190e5d522589cb6db327a99960137a7473b
      
https://github.com/qemu/qemu/commit/e7f2e190e5d522589cb6db327a99960137a7473b
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: simplify do_compress_ram_page

The goto is not needed at all.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 47fe16ff666bf1d106dd7d74e94ba2dc050b1c95
      
https://github.com/qemu/qemu/commit/47fe16ff666bf1d106dd7d74e94ba2dc050b1c95
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Move ram_release_pages() call to save_zero_page_to_file()

We always need to call it when we find a zero page, so put it in a
single place.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>


  Commit: fc6705229cbca807f2bab9a8acf22b0ab249e55c
      
https://github.com/qemu/qemu/commit/fc6705229cbca807f2bab9a8acf22b0ab249e55c
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c

  Log Message:
  -----------
  multifd: Use proper maximum compression values

It happens that there are functions to calculate the worst possible
compression size for a packet.  Use them.

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 226468ba3dea950ab4bb0b729878dde25812da1c
      
https://github.com/qemu/qemu/commit/226468ba3dea950ab4bb0b729878dde25812da1c
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

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

  Log Message:
  -----------
  multifd: Move iov from pages to params

This will allow us to reduce the number of system calls on the next patch.

Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69
      
https://github.com/qemu/qemu/commit/48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c

  Log Message:
  -----------
  multifd: Make zlib use iov's

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 0a818b89eb8eaf79ae651405907d8110a0935cfd
      
https://github.com/qemu/qemu/commit/0a818b89eb8eaf79ae651405907d8110a0935cfd
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zstd.c

  Log Message:
  -----------
  multifd: Make zstd use iov's

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 468fcb5dd0c965e1af0da9efab09b1462631da18
      
https://github.com/qemu/qemu/commit/468fcb5dd0c965e1af0da9efab09b1462631da18
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h

  Log Message:
  -----------
  multifd: Remove send_write() method

Everything use now iov's.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: d48c3a044537689866fe44e65d24c7d39a68868a
      
https://github.com/qemu/qemu/commit/d48c3a044537689866fe44e65d24c7d39a68868a
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  multifd: Use a single writev on the send side

Until now, we wrote the packet header with write(), and the rest of the
pages with writev().  Just increase the size of the iovec and do a
single writev().

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: c27779a215843e92eb120de80f982f3a63d1becb
      
https://github.com/qemu/qemu/commit/c27779a215843e92eb120de80f982f3a63d1becb
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  multifd: Unfold "used" variable by its value

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 815956f03902980c771da64b17f7f791c1cb57b0
      
https://github.com/qemu/qemu/commit/815956f03902980c771da64b17f7f791c1cb57b0
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h
    M migration/trace-events

  Log Message:
  -----------
  multifd: Use normal pages array on the send side

We are only sending normal pages through multifd channels.
Later on this series, we are going to also send zero pages.
We are going to detect if a page is zero or non zero in the multifd
channel thread, not on the main thread.

So we receive an array of pages page->offset[N]

And we will end with:

p->normal[N - zero_pages]
p->zero[zero_pages].

In this patch, we just copy all the pages in offset to normal.

for (i = 0; i < pages->num; i++) {
    p->narmal[p->normal_num] = pages->offset[i];
    p->normal_num++:
}

Later in the series this becomes:

for (i = 0; i < pages->num; i++) {
    if (buffer_is_zero(page->offset[i])) {
        p->zerol[p->zero_num] = pages->offset[i];
        p->zero_num++:
    } else {
        p->narmal[p->normal_num] = pages->offset[i];
        p->normal_num++:
    }
}

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

---

Improving comment (dave)
Renaming num_normal_pages to total_normal_pages (peter)


  Commit: cf2d4aa8a276f8540eef593141b7933487fa32b2
      
https://github.com/qemu/qemu/commit/cf2d4aa8a276f8540eef593141b7933487fa32b2
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h

  Log Message:
  -----------
  multifd: Use normal pages array on the recv side

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

---

Rename num_normal_pages to total_normal_pages (peter)


  Commit: faf60935df64f4225b89c29306e0dc3ed00e1117
      
https://github.com/qemu/qemu/commit/faf60935df64f4225b89c29306e0dc3ed00e1117
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h

  Log Message:
  -----------
  multifd: recv side only needs the RAMBlock host address

So we can remove the MultiFDPages.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 8c0ec0b2b0622563a8620d0bf2bb60e90e18df18
      
https://github.com/qemu/qemu/commit/8c0ec0b2b0622563a8620d0bf2bb60e90e18df18
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

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

  Log Message:
  -----------
  multifd: Rename pages_used to normal_pages

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 17e313406126125036191f11e9c70298be34c987
      
https://github.com/qemu/qemu/commit/17e313406126125036191f11e9c70298be34c987
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M hw/acpi/cpu.c
    M hw/acpi/ich9.c
    M hw/acpi/memory_hotplug.c
    M hw/acpi/piix4.c
    M hw/acpi/tco.c
    M hw/audio/pcspk.c
    M hw/display/macfb.c
    M hw/dma/xlnx-zdma.c
    M hw/dma/xlnx_csu_dma.c
    M hw/gpio/imx_gpio.c
    M hw/misc/bcm2835_mbox.c
    M hw/net/can/can_kvaser_pci.c
    M hw/net/can/can_mioe3680_pci.c
    M hw/net/can/can_pcm3680_pci.c
    M hw/net/can/can_sja1000.c
    M hw/net/can/ctucan_core.c
    M hw/net/can/ctucan_pci.c
    M hw/ppc/ppc.c
    M hw/scsi/megasas.c
    M hw/scsi/mptsas.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M target/openrisc/machine.c
    M target/ppc/machine.c
    M target/sparc/machine.c

  Log Message:
  -----------
  Remove unnecessary minimum_version_id_old fields

The migration code will not look at a VMStateDescription's
minimum_version_id_old field unless that VMSD has set the
load_state_old field to something non-NULL.  (The purpose of
minimum_version_id_old is to specify what migration version is needed
for the code in the function pointed to by load_state_old to be able
to handle it on incoming migration.)

We have exactly one VMSD which still has a load_state_old,
in the PPC CPU; every other VMSD which sets minimum_version_id_old
is doing so unnecessarily. Delete all the unnecessary ones.

Commit created with:
  sed -i '/\.minimum_version_id_old/d' $(git grep -l '\.minimum_version_id_old')
with the one legitimate use then hand-edited back in.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>

Signed-off-by: Juan Quintela <quintela@redhat.com>

---

It missed vmstate_ppc_cpu.


  Commit: 444252b96a63fef6537af0a43665905b48816927
      
https://github.com/qemu/qemu/commit/444252b96a63fef6537af0a43665905b48816927
  Author: Zhang Chen <chen.zhang@intel.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration/migration.c: Add missed default error handler for migration state

In the migration_completion() no other status is expected, for
example MIGRATION_STATUS_CANCELLING, MIGRATION_STATUS_CANCELLED, etc.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: eeeb48ee3389e837428370a8ed2772c2e74cce49
      
https://github.com/qemu/qemu/commit/eeeb48ee3389e837428370a8ed2772c2e74cce49
  Author: Zhang Chen <chen.zhang@intel.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration/migration.c: Avoid COLO boot in postcopy migration

COLO dose not support postcopy migration and remove the Fixme.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 01ee5e355620ab1cc356964472f89cfb89cddc6d
      
https://github.com/qemu/qemu/commit/01ee5e355620ab1cc356964472f89cfb89cddc6d
  Author: Zhang Chen <chen.zhang@intel.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration/migration.c: Remove the MIGRATION_STATUS_ACTIVE when migration 
finished

The MIGRATION_STATUS_ACTIVE indicates that migration is running.
Remove it to be handled by the default operation,
It should be part of the unknown ending states.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 9200265838e5e6f43b1acdafb610d0a813b801c1
      
https://github.com/qemu/qemu/commit/9200265838e5e6f43b1acdafb610d0a813b801c1
  Author: David Edmondson <david.edmondson@oracle.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Report the error returned when save_live_iterate fails

Should qemu_savevm_state_iterate() encounter a failure when calling a
particular save_live_iterate function, report the error code returned
by the function.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: a6d1223b4ae47e4d4642fce2ec504484a1355723
      
https://github.com/qemu/qemu/commit/a6d1223b4ae47e4d4642fce2ec504484a1355723
  Author: Xu Zheng <xuzheng@cmss.chinamobile.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/ram: clean up unused comment.

Just a removal of an unused comment.
a0a8aa147aa did many fixes and removed the parameter named "ms", but forget to 
remove the corresponding comment in function named "ram_save_host_page".

Signed-off-by: Xu Zheng <xuzheng@cmss.chinamobile.com>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>


  Commit: 53405ffb33e31c32725d7c463f07074d4f622677
      
https://github.com/qemu/qemu/commit/53405ffb33e31c32725d7c463f07074d4f622677
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

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

  Log Message:
  -----------
  migration: Drop dead code of ram_debug_dump_bitmap()

I planned to add "#ifdef DEBUG_POSTCOPY" around the function too because
otherwise it'll be compiled into qemu binary even if it'll never be used.  Then
I found that maybe it's easier to just drop it for good..

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: dc57d6f2ec3eb9ba6d8a6cac735bf6d02017dda2
      
https://github.com/qemu/qemu/commit/dc57d6f2ec3eb9ba6d8a6cac735bf6d02017dda2
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Don't return for postcopy_chunk_hostpages()

It always return zero, because it just can't go wrong so far.  Simplify the
code with no functional change.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: e3fbf760218fe06d0c95bb595774c76206219e2f
      
https://github.com/qemu/qemu/commit/e3fbf760218fe06d0c95bb595774c76206219e2f
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Drop postcopy_chunk_hostpages()

This function calls three functions:

  - postcopy_discard_send_init(ms, block->idstr);
  - postcopy_chunk_hostpages_pass(ms, block);
  - postcopy_discard_send_finish(ms);

However only the 2nd function call is meaningful.  It's major role is to make
sure dirty bits are applied in host-page-size granule, so there will be no
partial dirty bits set for a whole host page if huge pages are used.

The 1st/3rd call are for latter when we want to send the disgard ranges.
They're mostly no-op here besides some tracepoints (which are misleading!).

Drop them, then we can directly drop postcopy_chunk_hostpages() as a whole
because we can call postcopy_chunk_hostpages_pass() directly.

There're still some nice comments above postcopy_chunk_hostpages() that explain
what it does.  Copy it over to the caller's site.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: f30c2e5ba81b8d388b7beeae84e6db5ea8220924
      
https://github.com/qemu/qemu/commit/f30c2e5ba81b8d388b7beeae84e6db5ea8220924
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Do chunk page in postcopy_each_ram_send_discard()

Right now we loop ramblocks for twice, the 1st time chunk the dirty bits with
huge page information; the 2nd time we send the discard ranges.  That's not
necessary - we can do them in a single loop.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 739fcc1b0e4b04216f971c9fb87fb0e9ec599c34
      
https://github.com/qemu/qemu/commit/739fcc1b0e4b04216f971c9fb87fb0e9ec599c34
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

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

  Log Message:
  -----------
  migration: Drop return code for disgard ram process

It will just never fail.  Drop those return values where they're constantly
zeros.

A tiny touch-up on the tracepoint so trace_ram_postcopy_send_discard_bitmap()
is called after the logic itself (which sounds more reasonable).

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 9e7d1223ace8c1182e362de8894ebe8d111c8918
      
https://github.com/qemu/qemu/commit/9e7d1223ace8c1182e362de8894ebe8d111c8918
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Don't return for postcopy_send_discard_bm_ram()

postcopy_send_discard_bm_ram() always return zero. Since it can't
fail, simplify and do not return anything.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 4c2d0f6dca24f3396ab0718ad3f9f53cc53004df
      
https://github.com/qemu/qemu/commit/4c2d0f6dca24f3396ab0718ad3f9f53cc53004df
  Author: David Edmondson <david.edmondson@oracle.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Introduce ram_transferred_add()

Replace direct manipulation of ram_counters.transferred with a
function.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: ae6806688016711bb9ec7541266d76ab511c5e3b
      
https://github.com/qemu/qemu/commit/ae6806688016711bb9ec7541266d76ab511c5e3b
  Author: David Edmondson <david.edmondson@oracle.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/migration.c
    M migration/ram.c
    M monitor/hmp-cmds.c
    M qapi/migration.json

  Log Message:
  -----------
  migration: Tally pre-copy, downtime and post-copy bytes independently

Provide information on the number of bytes copied in the pre-copy,
downtime and post-copy phases of migration.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 258f5c9825a9fb77aeae8a9d8c0877e714c090e2
      
https://github.com/qemu/qemu/commit/258f5c9825a9fb77aeae8a9d8c0877e714c090e2
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: No off-by-one for pss->page update in host page size

We used to do off-by-one fixup for pss->page when finished one host huge page
transfer.  That seems to be unnecesary at all.  Drop it.

Cc: Keqian Zhu <zhukeqian1@huawei.com>
Cc: Kunkun Jiang <jiangkunkun@huawei.com>
Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 2d1c37c603ab3ed9ec1abfc4f4491b8680b23a77
      
https://github.com/qemu/qemu/commit/2d1c37c603ab3ed9ec1abfc4f4491b8680b23a77
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/postcopy-ram.c

  Log Message:
  -----------
  migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat

This patch allows us to read the tid even without blocktime feature enabled.
It's useful when tracing postcopy fault thread on faulted pages to show thread
id too with the address.

Remove the comments - they're merely not helpful at all.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: a1fe28df7547120bc3ac8bc4c3d1565d4cf7905e
      
https://github.com/qemu/qemu/commit/a1fe28df7547120bc3ac8bc4c3d1565d4cf7905e
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Add postcopy_has_request()

Add a helper to detect whether postcopy has pending request.

Since at it, cleanup the code a bit, e.g. in unqueue_page() we shouldn't need
to check it again on queue empty because we're the only one (besides cleanup
code, which should never run during this process) that will take a request off
the list, so the request list can only grow but not shrink under the hood.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: cfd66f30fb0f735df06ff4220e5000290a43dad3
      
https://github.com/qemu/qemu/commit/cfd66f30fb0f735df06ff4220e5000290a43dad3
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/ram.c
    M migration/trace-events

  Log Message:
  -----------
  migration: Simplify unqueue_page()

This patch simplifies unqueue_page() on both sides of it (itself, and caller).

Firstly, due to the fact that right after unqueue_page() returned true, we'll
definitely send a huge page (see ram_save_huge_page() call - it will _never_
exit before finish sending that huge page), so unqueue_page() does not need to
jump in small page size if huge page is enabled on the ramblock.  IOW, it's
destined that only the 1st 4K page will be valid, when unqueue the 2nd+ time
we'll notice the whole huge page has already been sent anyway.  Switching to
operating on huge page reduces a lot of the loops of redundant unqueue_page().

Meanwhile, drop the dirty check.  It's not helpful to call test_bit() every
time to jump over clean pages, as ram_save_host_page() has already done so,
while in a faster way (see commit ba1b7c812c ("migration/ram: Optimize
ram_save_host_page()", 2021-05-13)).  So that's not necessary too.

Drop the two tracepoints along the way - based on above analysis it's very
possible that no one is really using it..

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 476ebf77fe8909ded10046edf26685bc28438162
      
https://github.com/qemu/qemu/commit/476ebf77fe8909ded10046edf26685bc28438162
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M migration/postcopy-ram.c

  Log Message:
  -----------
  migration: Move temp page setup and cleanup into separate functions

Temp pages will need to grow if we want to have multiple channels for postcopy,
because each channel will need its own temp page to cache huge page data.

Before doing that, cleanup the related code.  No functional change intended.

Since at it, touch up the errno handling a little bit on the setup side.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: d90e6f665d3ac197f83d93ad37147fe677521209
      
https://github.com/qemu/qemu/commit/d90e6f665d3ac197f83d93ad37147fe677521209
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-01-29 (Sat, 29 Jan 2022)

  Changed paths:
    M hw/acpi/cpu.c
    M hw/acpi/ich9.c
    M hw/acpi/memory_hotplug.c
    M hw/acpi/piix4.c
    M hw/acpi/tco.c
    M hw/audio/pcspk.c
    M hw/display/macfb.c
    M hw/dma/xlnx-zdma.c
    M hw/dma/xlnx_csu_dma.c
    M hw/gpio/imx_gpio.c
    M hw/misc/bcm2835_mbox.c
    M hw/net/can/can_kvaser_pci.c
    M hw/net/can/can_mioe3680_pci.c
    M hw/net/can/can_pcm3680_pci.c
    M hw/net/can/can_sja1000.c
    M hw/net/can/ctucan_core.c
    M hw/net/can/ctucan_pci.c
    M hw/ppc/ppc.c
    M hw/scsi/megasas.c
    M hw/scsi/mptsas.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M migration/migration.c
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h
    M migration/postcopy-ram.c
    M migration/ram.c
    M migration/ram.h
    M migration/savevm.c
    M migration/trace-events
    M monitor/hmp-cmds.c
    M qapi/migration.json
    M target/openrisc/machine.c
    M target/ppc/machine.c
    M target/sparc/machine.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/quintela-gitlab/tags/migration-20220128-pull-request' into staging

Migration Pull request (Take 2)

Hi

This time I have disabled vmstate canary patches form Dave Gilbert.

Let's see if it works.

Later, Juan.

# gpg: Signature made Fri 28 Jan 2022 18:30:25 GMT
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* remotes/quintela-gitlab/tags/migration-20220128-pull-request: (36 commits)
  migration: Move temp page setup and cleanup into separate functions
  migration: Simplify unqueue_page()
  migration: Add postcopy_has_request()
  migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat
  migration: No off-by-one for pss->page update in host page size
  migration: Tally pre-copy, downtime and post-copy bytes independently
  migration: Introduce ram_transferred_add()
  migration: Don't return for postcopy_send_discard_bm_ram()
  migration: Drop return code for disgard ram process
  migration: Do chunk page in postcopy_each_ram_send_discard()
  migration: Drop postcopy_chunk_hostpages()
  migration: Don't return for postcopy_chunk_hostpages()
  migration: Drop dead code of ram_debug_dump_bitmap()
  migration/ram: clean up unused comment.
  migration: Report the error returned when save_live_iterate fails
  migration/migration.c: Remove the MIGRATION_STATUS_ACTIVE when migration 
finished
  migration/migration.c: Avoid COLO boot in postcopy migration
  migration/migration.c: Add missed default error handler for migration state
  Remove unnecessary minimum_version_id_old fields
  multifd: Rename pages_used to normal_pages
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/95a6af2a006e...d90e6f665d3a



reply via email to

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