qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d2026e: multifd: Fix the number of channels r


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] d2026e: multifd: Fix the number of channels ready
Date: Fri, 28 Apr 2023 00:40:47 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: d2026ee117147893f8d80f060cede6d872ecbd7f
      
https://github.com/qemu/qemu/commit/d2026ee117147893f8d80f060cede6d872ecbd7f
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  multifd: Fix the number of channels ready

We don't wait in the sem when we are doing a sync_main.  Make it wait
there.  To make things clearer, we mark the channel ready at the
begining of the thread loop.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>


  Commit: 61a174e227422790f1b264fed6df5c6686757edc
      
https://github.com/qemu/qemu/commit/61a174e227422790f1b264fed6df5c6686757edc
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Create migrate_params_init() function

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 8f9c532756c598c29282a1ec2f11fb615e2fd3c7
      
https://github.com/qemu/qemu/commit/8f9c532756c598c29282a1ec2f11fb615e2fd3c7
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M migration/options.c

  Log Message:
  -----------
  migration: Make all functions check have the same format

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: f5da8ba4777f3ab88bfee82bbf8261d6295a26a2
      
https://github.com/qemu/qemu/commit/f5da8ba4777f3ab88bfee82bbf8261d6295a26a2
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Create migrate_downtime_limit() function

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 87c22901094a911e687e2ad014be868a9723c486
      
https://github.com/qemu/qemu/commit/87c22901094a911e687e2ad014be868a9723c486
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Move migrate_set_block_incremental() to options.c

Once there, make it more regular and remove the need for
MigrationState parameter.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: b7b73122dd12b5fea63347253b428a9af66303c2
      
https://github.com/qemu/qemu/commit/b7b73122dd12b5fea63347253b428a9af66303c2
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Move block_cleanup_parameters() to options.c

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: b1a8795654561b23eaf5bb134b61e5b23545046d
      
https://github.com/qemu/qemu/commit/b1a8795654561b23eaf5bb134b61e5b23545046d
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Remove MigrationState from block_cleanup_parameters()

This makes the function more regular with everything else.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: d5c3e1959cbabe9456bf1d5860ad718c6cd27fb8
      
https://github.com/qemu/qemu/commit/d5c3e1959cbabe9456bf1d5860ad718c6cd27fb8
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Create migrate_tls_creds() function

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

---

Moved the type to const char * (vladimir)


  Commit: 2eb0308bbd5e20bb20229c790dc2c7f1ae8e3ba9
      
https://github.com/qemu/qemu/commit/2eb0308bbd5e20bb20229c790dc2c7f1ae8e3ba9
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Create migrate_tls_authz() function

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

---

Moved the type to const char * (vladimir)


  Commit: 1f2f366c328e851f302c3a97ce4ac18f86a64279
      
https://github.com/qemu/qemu/commit/1f2f366c328e851f302c3a97ce4ac18f86a64279
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Create migrate_tls_hostname() function

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

---

Moved the type to const char * (vladimir)


  Commit: b804b35b1c8a0edfd127ac20819c234be55ac7fc
      
https://github.com/qemu/qemu/commit/b804b35b1c8a0edfd127ac20819c234be55ac7fc
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M migration/block-dirty-bitmap.c
    M migration/options.c
    M migration/options.h

  Log Message:
  -----------
  migration: Create migrate_block_bitmap_mapping() function

Notice that we changed the test of ->has_block_bitmap_mapping
for the test that block_bitmap_mapping is not NULL.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

---

Make it return const (vladimir)


  Commit: f9436522c8dd35a51f6d796501de7fd4d4928481
      
https://github.com/qemu/qemu/commit/f9436522c8dd35a51f6d796501de7fd4d4928481
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Move migration_properties to options.c

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 77c259a4cb1c9799754b48f570301ebf1de5ded8
      
https://github.com/qemu/qemu/commit/77c259a4cb1c9799754b48f570301ebf1de5ded8
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M hw/core/machine.c
    M migration/migration.h
    M migration/options.c
    M migration/options.h

  Log Message:
  -----------
  multifd: Create property multifd-flush-after-each-section

We used to flush all channels at the end of each RAM section
sent.  That is not needed, so preparing to only flush after a full
iteration through all the RAM.

Default value of the property is false.  But we return "true" in
migrate_multifd_flush_after_each_section() until we implement the code
in following patches.

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

---

Rename each-iteration to after-each-section
Rename multifd-sync-after-each-section to
       multifd-flush-after-each-section
Move to machine-8.0 (peter)


  Commit: b05292c237030343516d073b1a1e5f49ffc017a8
      
https://github.com/qemu/qemu/commit/b05292c237030343516d073b1a1e5f49ffc017a8
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: Protect multifd_send_sync_main() calls

We only need to do that on the ram_save_iterate() call on sending and
on destination when we get a RAM_SAVE_FLAG_EOS.

In setup() and complete() we need to synch in both new and old cases,
so don't add a check there.

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

---

Remove the wrappers that we take out on patch 5.


  Commit: 294e5a4034e81b3d8db03b4e0f691386f20d6ed3
      
https://github.com/qemu/qemu/commit/294e5a4034e81b3d8db03b4e0f691386f20d6ed3
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  multifd: Only flush once each full round of memory

We need to add a new flag to mean to flush at that point.
Notice that we still flush at the end of setup and at the end of
complete stages.

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

---

Add missing qemu_fflush(), now it passes all tests always.
In the previous version, the check that changes the default value to
false got lost in some rebase.  Get it back.


  Commit: 7757b55eedd5d571d0b0c5f570b01dc3ca910a62
      
https://github.com/qemu/qemu/commit/7757b55eedd5d571d0b0c5f570b01dc3ca910a62
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M include/qemu/stats64.h
    M util/stats64.c

  Log Message:
  -----------
  stat64: Add stat64_set() operation

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 72f8e58707395d24c177ffa9f88a25329638fc98
      
https://github.com/qemu/qemu/commit/72f8e58707395d24c177ffa9f88a25329638fc98
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Make dirty_pages_rate atomic

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>

---

Don't use __nocheck() variants
Use stat64_get()


  Commit: 73208a336e249bc8e3bdd76a78d0af7ecaee9178
      
https://github.com/qemu/qemu/commit/73208a336e249bc8e3bdd76a78d0af7ecaee9178
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

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

  Log Message:
  -----------
  migration: Make dirty_bytes_last_sync atomic

As we set its value, it needs to be operated with atomics.
We rename it from remaining to better reflect its meaning.

Statistics always return the real reamaining bytes.  This was used to
store how much pages where dirty on the previous generation, so we can
calculate the expected downtime as: dirty_bytes_last_sync /
current_bandwith.

If we use the actual remaining bytes, we would see a very small value
at the end of the iteration.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

---

I am open to use ram_bytes_remaining() in its only use and be more
"optimistic" about the downtime.

Don't use __nocheck() functions.
Use stat64_get() now that it exists.


  Commit: 05d50ba2d4668d43a835c5a502efdec9b92646e6
      
https://github.com/qemu/qemu/commit/05d50ba2d4668d43a835c5a502efdec9b92646e6
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-04-28 (Fri, 28 Apr 2023)

  Changed paths:
    M hw/core/machine.c
    M include/qemu/stats64.h
    M migration/block-dirty-bitmap.c
    M migration/migration.c
    M migration/migration.h
    M migration/multifd.c
    M migration/options.c
    M migration/options.h
    M migration/ram.c
    M migration/ram.h
    M migration/tls.c
    M util/stats64.c

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

Migration Pull request (20230427 edition)

Hi

Everything that has been reviewed:
- stat64_set() by paolo
- atomic_counters series fully reviewed (juan)
- move capabilities to options.c fully reviewed (juan)
- fix the channels_ready semaphore (juan)
- multifd flush optimization reviewed (juan)

Please, apply.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmRKi3YACgkQ9IfvGFhy
# 1yPtERAAgkBt4g3tpn90q+QeFLBPyo0KGxX4UiAmh8aiGRAJzmSJfjaQG3RgK0vM
# Iyat60Tx6lpHta7xRE+pDF7tXmoi0631B5FJjfuyTIFGWdrOpjGHihuxWdnIjK0H
# ZhR3LfQvHqybMfiyZN/7T5/qICB0zZ+erIeoaurRU3RVrO8yRPM+VBwsYr1RW1S4
# DxUeXEJF09tat7TgiQYp2w5cMPcQ2AvzgViR2r7yc0WjY2yUscyMjuPbHPqAsYWB
# UkbNuH7M/quvHqGvgxGYEQ+a6wyBzKlissjxWe8KTuSLNML2RVR6IrpuEPe6XyGe
# FWi+XRB5114EMy7YjjgTWzcLMC9EmhpzKTgJi0NEtL+cGRb9ZaSaSLE5yO7GLF9b
# efhCXT9jIef9/3Hi+Kr0juJ3nX6c7pINTAsx7wxKU0phz5kYx37IqIioMlVDh1ew
# ECpH+8Syrp/zYytc/HIpyOwIR9VdZrRi6jr2yqcc9lLLcuNUzl+E+9mAxWzO/gef
# +cYPnQZC0rjIzJSBZjq7TXYFNblD6HreONGL8UdFN0B7Js5mPu2PU3449jYNSOxi
# 1aj/eHNXEcqKcVZ3GDGgtus3ARvFsbEba0UZYIVboKp5i96f8O9YqKvRdBjAjpq1
# IDT/fvI2Fj1mjKi8KuAq8fK5utm+g4NR9WkQX0d661dQNZ3XqVc=
# =NE9v
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 27 Apr 2023 03:49:26 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-20230427-pull-request' of 
https://gitlab.com/juan.quintela/qemu:
  migration: Make dirty_bytes_last_sync atomic
  migration: Make dirty_pages_rate atomic
  stat64: Add stat64_set() operation
  multifd: Only flush once each full round of memory
  multifd: Protect multifd_send_sync_main() calls
  multifd: Create property multifd-flush-after-each-section
  migration: Move migration_properties to options.c
  migration: Create migrate_block_bitmap_mapping() function
  migration: Create migrate_tls_hostname() function
  migration: Create migrate_tls_authz() function
  migration: Create migrate_tls_creds() function
  migration: Remove MigrationState from block_cleanup_parameters()
  migration: Move block_cleanup_parameters() to options.c
  migration: Move migrate_set_block_incremental() to options.c
  migration: Create migrate_downtime_limit() function
  migration: Make all functions check have the same format
  migration: Create migrate_params_init() function
  multifd: Fix the number of channels ready

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


Compare: https://github.com/qemu/qemu/compare/cc5ee50fff9d...05d50ba2d466



reply via email to

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