qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1536d1: qtest/migration-test.c: Add tests wit


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 1536d1: qtest/migration-test.c: Add tests with compress en...
Date: Mon, 08 May 2023 23:33:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1536d1da5dff53e53474e9c012c19ddc7cdbc6d0
      
https://github.com/qemu/qemu/commit/1536d1da5dff53e53474e9c012c19ddc7cdbc6d0
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  qtest/migration-test.c: Add tests with compress enabled

There has never been tests for migration with compress enabled.

Add suitable tests, testing with compress-wait-thread = false
too.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: dc066da8bdc95b431a6cd3f1547e9cc6a2e3c24b
      
https://github.com/qemu/qemu/commit/dc066da8bdc95b431a6cd3f1547e9cc6a2e3c24b
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  qtest/migration-test.c: Add postcopy tests with compress enabled

Add postcopy tests with compress enabled to ensure nothing breaks
with the refactoring in the next commits.

preempt+compress is blocked, so no test needed for that case.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 97274a871fc4155635414bfd343b5df599ecba76
      
https://github.com/qemu/qemu/commit/97274a871fc4155635414bfd343b5df599ecba76
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Let the compress threads return a CompressResult enum

This will be used in the next commits to move save_page_header()
out of compress code.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


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

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Dont change param->block in the compress thread

Instead introduce a extra parameter to trigger the compress thread.
Now, when the compress thread is done, we know what RAMBlock and
offset it did compress.

This will be used in the next commits to move save_page_header()
out of compress code.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: b5cf1cd3e81eebb6343404fe8029d61dfb817d5a
      
https://github.com/qemu/qemu/commit/b5cf1cd3e81eebb6343404fe8029d61dfb817d5a
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Reset result after sending queued data

And take the param->mutex lock for the whole section to ensure
thread-safety.
Now, it is explicitly clear if there is no queued data to send.
Before, this was handled by param->file stream being empty and thus
qemu_put_qemu_file() not sending anything.

This will be used in the next commits to move save_page_header()
out of compress code.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 3e81763e4c2e9f1b4bc331605a6450b6845d8970
      
https://github.com/qemu/qemu/commit/3e81763e4c2e9f1b4bc331605a6450b6845d8970
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Do not call save_page_header() from compress threads

save_page_header() accesses several global variables, so calling it
from multiple threads is pretty ugly.

Instead, call save_page_header() before writing out the compressed
data from the compress buffer to the migration stream.

This also makes the core compress code more independend from ram.c.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 680628d200161be1912623c0884bbb4902c19dea
      
https://github.com/qemu/qemu/commit/680628d200161be1912623c0884bbb4902c19dea
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Call update_compress_thread_counts from compress_send_queued_data

This makes the core compress code more independend from ram.c.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: ef4f5f5d5a51eae79285a32f34034969bf6b257a
      
https://github.com/qemu/qemu/commit/ef4f5f5d5a51eae79285a32f34034969bf6b257a
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Remove last ram.c dependency from the core compress code

Make compression interfaces take send_queued_data() as an argument.
Remove save_page_use_compression() from flush_compressed_data().

This removes the last ram.c dependency from the core compress code.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: b5ca3368d9e7484f6a22d4d770b07a78f4c364d3
      
https://github.com/qemu/qemu/commit/b5ca3368d9e7484f6a22d4d770b07a78f4c364d3
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/meson.build
    A migration/ram-compress.c
    A migration/ram-compress.h
    M migration/ram.c

  Log Message:
  -----------
  ram.c: Move core compression code into its own file

No functional changes intended.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: b1f17720c117d4811b5571d87dcbc5b99d79266b
      
https://github.com/qemu/qemu/commit/b1f17720c117d4811b5571d87dcbc5b99d79266b
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

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

  Log Message:
  -----------
  ram.c: Move core decompression code into its own file

No functional changes intended.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 4024cc8506139a8f04f3f99ba478880410af10f5
      
https://github.com/qemu/qemu/commit/4024cc8506139a8f04f3f99ba478880410af10f5
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/qemu-file.c
    M migration/qemu-file.h
    M migration/ram-compress.c
    M migration/ram.c

  Log Message:
  -----------
  ram compress: Assert that the file buffer matches the result

Before this series, "nothing to send" was handled by the file buffer
being empty. Now it is tracked via param->result.

Assert that the file buffer state matches the result.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 52623f23b0d114837a0d6278180b3e3ae8947117
      
https://github.com/qemu/qemu/commit/52623f23b0d114837a0d6278180b3e3ae8947117
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/meson.build
    M migration/ram-compress.c

  Log Message:
  -----------
  ram-compress.c: Make target independent

Make ram-compress.c target independent.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: c323518a7aab1c01740a468671b7f2b517d3bca6
      
https://github.com/qemu/qemu/commit/c323518a7aab1c01740a468671b7f2b517d3bca6
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2023-05-08 (Mon, 08 May 2023)

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

  Log Message:
  -----------
  migration: Initialize and cleanup decompression in migration.c

This fixes compress with colo.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 271477b59e723250f17a7e20f139262057921b6a
      
https://github.com/qemu/qemu/commit/271477b59e723250f17a7e20f139262057921b6a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M migration/meson.build
    M migration/migration.c
    M migration/qemu-file.c
    M migration/qemu-file.h
    A migration/ram-compress.c
    A migration/ram-compress.h
    M migration/ram.c
    M tests/qtest/migration-test.c

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

Migration PULL request (20230508 edition, take 2)

Hi

This is just the compression bits of the Migration PULL request for
20230428.  Only change is that we don't run the compression tests by
default.

The problem already exist with compression code.  The test just show
that it don't work.

- Add migration tests for (old) compress migration code (lukas)
- Make compression code independent of ram.c (lukas)
- Move compression code into ram-compress.c (lukas)

Please apply, Juan.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmRZRMwACgkQ9IfvGFhy
# 1yOdixAA1fOLanaYMUJZGLZ9sVTt7rDc4AEPRGkQOYYZNGK3LHaG2Dx9ob2/CEkS
# /YPp9Oth9QAYHZgiI2Xx8GSg98PRVr9b/GlQPseoCOFXnUL89rTpQtxQq4CV41E6
# AA5Dr8Z07hsr47ERQERFfDGD4zsvpn+NWM1ZBy+CCilf/o8UU4eIyfRF34YgSScv
# FVdWM4czUKei9fe2Go1KnMCz1GnT/6epl47Hs8zn9WAEeUfLILp7dbkbNq26F65G
# 8YC8YnrikxU+2j+NIyIbRxbIdjR+JUbR14AyezwWZ2zGbirwWN1DP2WQx0QIZOqM
# ZuCqIDj5HpNSlHmShI0gNDfPvs+iM+sFSwQ7JE8Q03hlES9HF5c+MOr3Pl3J91hH
# EEmkk5gBJ2v2tvBuHgwVAQ2UH1+XT+a7RXeoMU1iizc2sXRGDK12ZsyaAg4D0oaF
# eohzJk2j1QXcx/DNK2G5uhzwgKvKv1/+rHyYQFtg+XuWVVipSNwqRjDJkDANAYZP
# VwKOOqDd5lHLOIzE1j61Yu06DJhkSoMvz74RQlqnk+r1EKJcTUZL52uhQor//DaL
# ULpBsgYzoMUMrtw7myHxq4t0t6mmOtOkb0CvO8dTzkIV0YgIFTtPFB0ySXOFUFf5
# UoFoMFKlfbPpDsvTNEVErxpaG4FBwZNVt67V2KXQ53xRPShyBiQ=
# =SG8L
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 08 May 2023 07:51:56 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 'compression-code-pull-request' of https://gitlab.com/juan.quintela/qemu:
  migration: Initialize and cleanup decompression in migration.c
  ram-compress.c: Make target independent
  ram compress: Assert that the file buffer matches the result
  ram.c: Move core decompression code into its own file
  ram.c: Move core compression code into its own file
  ram.c: Remove last ram.c dependency from the core compress code
  ram.c: Call update_compress_thread_counts from compress_send_queued_data
  ram.c: Do not call save_page_header() from compress threads
  ram.c: Reset result after sending queued data
  ram.c: Dont change param->block in the compress thread
  ram.c: Let the compress threads return a CompressResult enum
  qtest/migration-test.c: Add postcopy tests with compress enabled
  qtest/migration-test.c: Add tests with compress enabled

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


Compare: https://github.com/qemu/qemu/compare/792f77f376ad...271477b59e72



reply via email to

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