Re: [Qemu-devel] [PATCH v2] net/colo-compare.c: Fix a crash in COLO Primary.

2019-05-06 Thread Lukas Straub
On Sat, 20 Apr 2019 19:14:25 +0200 Lukas Straub wrote: > From: Lukas Straub > Because event_unhandled_count may be accessed concurrently, it needs > to be protected by taking the lock. However the assert is outside the > lock, probably causing it to read garbage and aborting Qemu &

Re: [PATCH v6 1/4] block/replication.c: Ignore requests after failover

2019-10-18 Thread Lukas Straub
On Sat, 5 Oct 2019 15:05:23 +0200 Lukas Straub wrote: > After failover the Secondary side of replication shouldn't change state, > because > it now functions as our primary disk. > > In replication_start, replication_do_checkpoint, replication_stop, ignore > the requ

Re: [PATCH v6 1/4] block/replication.c: Ignore requests after failover

2019-10-23 Thread Lukas Straub
On Wed, 23 Oct 2019 14:49:29 +0200 Max Reitz wrote: > On 05.10.19 15:05, Lukas Straub wrote: > > After failover the Secondary side of replication shouldn't change state, > > because > > it now functions as our primary disk. > > > > In replic

Re: [PATCH 0/4] colo: Introduce resource agent and high-level test

2019-12-18 Thread Lukas Straub
On Wed, 27 Nov 2019 22:11:34 +0100 Lukas Straub wrote: > On Fri, 22 Nov 2019 09:46:46 + > "Dr. David Alan Gilbert" wrote: > > > * Lukas Straub (lukasstra...@web.de) wrote: > > > Hello Everyone, > > > These patches introduce a resource agent

[PATCH 2/4] colo: Introduce resource agent

2019-11-21 Thread Lukas Straub
Introduce a resource agent which can be used in a Pacemaker cluster to manage qemu COLO. Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/colo | 1026 ++ 1 file changed, 1026 insertions(+) create mode 100755 scripts/colo-resource-agent/colo diff --git a

[PATCH 0/4] colo: Introduce resource agent and high-level test

2019-11-21 Thread Lukas Straub
failover, because qemu hangs while removing the replication related block nodes. Note that this also happens in real world test when cutting power to the peer host, so this needs to be fixed. Based-on: ([PATCH v7 0/4] colo: Add support for continuous replication) Lukas Straub (4): block

[PATCH 4/4] MAINTAINERS: Add myself as maintainer for COLO resource agent

2019-11-21 Thread Lukas Straub
While I'm not going to have much time for this, I'll still try to test and review patches. Signed-off-by: Lukas Straub --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d6de200453..aad8356149 100644 --- a/MAINTAINERS +++ b/M

[PATCH 1/4] block/quorum.c: stable children names

2019-11-21 Thread Lukas Straub
If we remove the child with the highest index from the quorum, decrement s->next_child_index. This way we get stable children names as long as we only remove the last child. Signed-off-by: Lukas Straub --- block/quorum.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/quorum.

[PATCH 3/4] colo: Introduce high-level test

2019-11-21 Thread Lukas Straub
Add high-level test relying on the colo resource-agent to test all failover cases while checking guest network connectivity Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/crm_master | 44 +++ tests/acceptance/colo.py | 444 + 2 files changed

Re: [PATCH 1/4] block/quorum.c: stable children names

2019-11-21 Thread Lukas Straub
On Thu, 21 Nov 2019 12:04:58 -0600 Eric Blake wrote: > On 11/21/19 11:49 AM, Lukas Straub wrote: > > If we remove the child with the highest index from the quorum, > > decrement s->next_child_index. This way we get stable children > > names as long as we on

Re: [PATCH 0/5] hvf: stability fixes for HVF

2019-11-24 Thread Lukas Straub
--- > target/i386/hvf/x86_emu.c| 3 -- > target/i386/hvf/x86hvf.c | 26 + > 6 files changed, 108 insertions(+), 84 deletions(-) > Hi, I can't comment on your code, but simply resend this as v2 with the checkpatch.pl errors fixed. You can run checkpatch.pl locally before posting (scripts/checkpatch.pl). Regards, Lukas Straub

Re: [PATCH 0/4] colo: Introduce resource agent and high-level test

2019-11-27 Thread Lukas Straub
On Fri, 22 Nov 2019 09:46:46 + "Dr. David Alan Gilbert" wrote: > * Lukas Straub (lukasstra...@web.de) wrote: > > Hello Everyone, > > These patches introduce a resource agent for use with the Pacemaker CRM and > > a > > high-level test utilizing it for te

Re: [PATCH 1/4] block/quorum.c: stable children names

2019-11-27 Thread Lukas Straub
On Tue, 26 Nov 2019 15:21:37 +0100 Alberto Garcia wrote: > On Thu 21 Nov 2019 07:34:45 PM CET, Lukas Straub wrote: > >> > diff --git a/block/quorum.c b/block/quorum.c > >> > index df68adcfaa..6100d4108a 100644 > >> > --- a/block/quorum.c > >> &

[Qemu-devel] [PATCH 1/3] Replication: Ignore requests after failover

2019-08-14 Thread Lukas Straub
After failover, the Secondary side of replication shouldn't change state. Add the necessary checks to ignore requests after failover. Signed-off-by: Lukas Straub --- block/replication.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/

[Qemu-devel] [PATCH 0/3] colo: Add support for continious replication

2019-08-14 Thread Lukas Straub
Hello Everyone, These Patches add support for continious replication to colo. Please review. Regards, Lukas Straub Lukas Straub (3): Replication: Ignore requests after failover net/filter.c: Add Options to insert filters anywhere in the filter list Document the qmp commands for continious

[Qemu-devel] [PATCH 2/3] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-08-14 Thread Lukas Straub
To switch the Secondary to Primary, we need to insert new filters before the filter-rewriter. Add the necessary options to insert filters anywhere in the filter list. Signed-off-by: Lukas Straub --- include/net/filter.h | 2 ++ net/filter.c | 73

[Qemu-devel] [PATCH 3/3] Document the qmp commands for continious replication

2019-08-14 Thread Lukas Straub
Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 185 +++ 1 file changed, 138 insertions(+), 47 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index ad24680d13..c08bfbd3a8 100644 --- a/docs/COLO-FT.txt +++ b/docs/COLO-FT.txt

[Qemu-devel] [PATCH v2 3/3] Update Documentation

2019-08-15 Thread Lukas Straub
Document the qemu command-line and qmp commands for continious replication Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 185 +++ 1 file changed, 138 insertions(+), 47 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index

[Qemu-devel] [PATCH v2 0/3] colo: Add support for continious replication

2019-08-15 Thread Lukas Straub
Hello Everyone, These Patches add support for continious replication to colo. Please review. Regards, Lukas Straub v2: - fix email formating - fix checkpatch.pl warnings - fix patchew error - clearer commit messages Lukas Straub (3): Replication: Ignore requests after failover net

[Qemu-devel] [PATCH v2 1/3] Replication: Ignore requests after failover

2019-08-15 Thread Lukas Straub
r) or BLOCK_REPLICATION_FAILOVER (failover in progres i.e. currently merging active and hidden images into the base image). Signed-off-by: Lukas Straub --- block/replication.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/block/replication.c b/block/replicat

[Qemu-devel] [PATCH v2 2/3] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-08-15 Thread Lukas Straub
e either "before" or "after" to specify where to insert the new filter relative to the one specified with position. Signed-off-by: Lukas Straub --- include/net/filter.h | 2 ++ net/filter.c | 71 +++- qemu-options.hx | 10

[Qemu-devel] [PATCH v2 1/3] Replication: Ignore requests after failover

2019-08-15 Thread Lukas Straub
r) or BLOCK_REPLICATION_FAILOVER (failover in progres i.e. currently merging active and hidden images into the base image). Signed-off-by: Lukas Straub --- block/replication.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/block/replication.c b/block/replicat

[Qemu-devel] [PATCH v2 2/3] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-08-15 Thread Lukas Straub
e either "before" or "after" to specify where to insert the new filter relative to the one specified with position. Signed-off-by: Lukas Straub --- include/net/filter.h | 2 ++ net/filter.c | 71 +++- qemu-options.hx | 10

[Qemu-devel] [PATCH v2 3/3] Update Documentation

2019-08-15 Thread Lukas Straub
Document the qemu command-line and qmp commands for continious replication Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 185 +++ 1 file changed, 138 insertions(+), 47 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index

[Qemu-devel] [PATCH v2 0/3] colo: Add support for continious replication

2019-08-15 Thread Lukas Straub
Hello Everyone, These Patches add support for continious replication to colo. Please review. Regards, Lukas Straub v2: - fix email formating - fix checkpatch.pl warnings - fix patchew error - clearer commit messages Lukas Straub (3): Replication: Ignore requests after failover net

Re: [Qemu-devel] [PATCH v2 0/3] colo: Add support for continious replication

2019-08-15 Thread Lukas Straub
On Thu, 15 Aug 2019 19:57:37 +0100 "Dr. David Alan Gilbert" wrote: > * Lukas Straub (lukasstra...@web.de) wrote: > > Hello Everyone, > > These Patches add support for continious replication to colo. > > Please review. > > > OK, for those who haven&

Re: [Qemu-devel] [PATCH v2 0/3] colo: Add support for continious replication

2019-08-16 Thread Lukas Straub
On Fri, 16 Aug 2019 01:51:20 + "Zhang, Chen" wrote: > > -Original Message- > > From: Lukas Straub [mailto:lukasstra...@web.de] > > Sent: Friday, August 16, 2019 3:48 AM > > To: Dr. David Alan Gilbert > > Cc: qemu-devel ; Zhang, Chen &g

[PATCH 1/2] qtest/migration-test.c: Add test with compress enabled

2023-04-02 Thread Lukas Straub
There has never been a test for migration with compress enabled. Add a suitable test, testing with compress-wait-thread = false too. iterations = 2 is intentional, so it also tests that no invalid thread state is left over from the previous iteration. Signed-off-by: Lukas Straub --- tests

[PATCH 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-02 Thread Lukas Straub
-off-by: Lukas Straub --- migration/ram.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 96e8a19a58..9d1817ab7b 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -688,12 +688,11 @@ exit: * @offset: offset

[PATCH RESEND 1/2] qtest/migration-test.c: Add test with compress enabled

2023-04-02 Thread Lukas Straub
There has never been a test for migration with compress enabled. Add a suitable test, testing with compress-wait-thread = false too. iterations = 2 is intentional, so it also tests that no invalid thread state is left over from the previous iteration. Signed-off-by: Lukas Straub --- tests

[PATCH RESEND 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-02 Thread Lukas Straub
-off-by: Lukas Straub --- migration/ram.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 96e8a19a58..9d1817ab7b 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -688,12 +688,11 @@ exit: * @offset: offset

[PATCH 02/14] ram.c: Dont change param->block in the compress thread

2023-04-02 Thread Lukas Straub
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 --- migration/ram.c

[PATCH 01/14] ram.c: Let the compress threads return a CompressResult enum

2023-04-02 Thread Lukas Straub
This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 9d1817ab7b

[PATCH 05/14] ram.c: Call update_compress_thread_counts from compress_send_queued_data

2023-04-02 Thread Lukas Straub
This makes the core compress code more independend from ram.c. Signed-off-by: Lukas Straub --- migration/ram.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 7ab008145b..f55eb0e587 100644 --- a/migration/ram.c

[PATCH 13/14] ram-compress.c: Make target independent

2023-04-02 Thread Lukas Straub
Make ram-compress.c target independent. Signed-off-by: Lukas Straub --- migration/meson.build| 2 +- migration/ram-compress.c | 16 +--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/migration/meson.build b/migration/meson.build index 262e3c9754..16f642031c

[PATCH 12/14] ram.c: Remove unused include after moving out code

2023-04-02 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 7a8f540737..9072d70f7c 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -32,7 +32,6 @@ #include "qemu/bitmap.h" #include "qemu/madvi

[PATCH 00/14] migration/ram.c: Refactor compress code

2023-04-02 Thread Lukas Straub
COLO with compress enabled. This series is based on the following series: https://lore.kernel.org/qemu-devel/af76761aa6978071c5b8e9b872b697db465a5520.1680457631.git.lukasstra...@web.de/T/#t Lukas Straub (14): ram.c: Let the compress threads return a CompressResult enum ram.c: Dont change param

[PATCH 06/14] ram.c: Remove last ram.c dependency from the core compress code

2023-04-02 Thread Lukas Straub
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 --- migration/ram.c | 27 +-- 1 file

[PATCH 09/14] ram.c: Remove whitespace (squash with previous patch)

2023-04-02 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/ram.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 114901241e..31b9b0b9ec 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -530,24 +530,6 @@ static bool pss_overlap(PageSearchStatus

[PATCH 04/14] ram.c: Do not call save_page_header() from compress threads

2023-04-02 Thread Lukas Straub
. Signed-off-by: Lukas Straub --- migration/ram.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index bef6292ef7..7ab008145b 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1476,17 +1476,13

[PATCH 11/14] ram compress: Assert that the file buffer matches the result

2023-04-02 Thread Lukas Straub
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 --- migration/qemu-file.c| 11 +++ migration/qemu-file.h| 1 +

[PATCH 08/14] ram.c: Move core compression code into its own file

2023-04-02 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub --- migration/meson.build| 5 +- migration/ram-compress.c | 273 +++ migration/ram-compress.h | 65 ++ migration/ram.c | 255 +--- 4 files

[PATCH 03/14] ram.c: Reset result after sending queued data

2023-04-02 Thread Lukas Straub
its to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 3c9fac086d..bef6292ef7 100644 --- a/migration/ram.c

[PATCH 07/14] ram.c: Introduce whitespace (squash with next patch)

2023-04-02 Thread Lukas Straub
Introduce whitespace to make it easier to reroll the series. Signed-off-by: Lukas Straub --- migration/ram.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 20428ccf42..475c04a18b 100644 --- a/migration/ram.c +++ b/migration/ram.c

[PATCH 10/14] ram.c: Move core decompression code into its own file

2023-04-02 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub --- migration/ram-compress.c | 203 ++ migration/ram-compress.h | 5 + migration/ram.c | 204 --- 3 files changed, 208 insertions(+), 204 deletions

[PATCH 14/14] migration: Initialize and cleanup decompression in migration.c

2023-04-02 Thread Lukas Straub
This fixes compress with colo. Signed-off-by: Lukas Straub --- migration/migration.c | 9 + migration/ram.c | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ae2025d9d8..cbdc10b840 100644 --- a/migration

Re: [PATCH 01/14] ram.c: Let the compress threads return a CompressResult enum

2023-04-03 Thread Lukas Straub
On Mon, 3 Apr 2023 09:25:41 +0200 Philippe Mathieu-Daudé wrote: > On 2/4/23 19:56, Lukas Straub wrote: > > This will be used in the next commits to move save_page_header() > > out of compress code. > > > > Signed-off-by: Lukas Straub > &g

Re: [PATCH RESEND 1/2] qtest/migration-test.c: Add test with compress enabled

2023-04-04 Thread Lukas Straub
On Mon, 3 Apr 2023 17:17:52 -0400 Peter Xu wrote: > On Sun, Apr 02, 2023 at 05:47:45PM +0000, Lukas Straub wrote: > > There has never been a test for migration with compress enabled. > > > > Add a suitable test, testing with compress-wait-thread = false > > too.

[PATCH for-8.0 v2 1/2] qtest/migration-test.c: Add tests with compress enabled

2023-04-04 Thread Lukas Straub
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 --- v2: - Split into 2 tests, one with compress-wait-thread = true and faster compress options. And one with compress-wait-thread

[PATCH for-8.0 v2 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-04 Thread Lukas Straub
: ec6f3ab9f4 ("migration: Move last_sent_block into PageSearchStatus") Signed-off-by: Lukas Straub Reviewed-by: Peter Xu --- v2: - Add Fixed: and Reviewed-by: tags migration/ram.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/migrati

Re: [PATCH 00/14] migration/ram.c: Refactor compress code

2023-04-05 Thread Lukas Straub
On Sun, 2 Apr 2023 17:55:59 + Lukas Straub wrote: > This series refactors the ram compress code. > > It first removes ram.c dependencies from the core compress code, then > moves it out to its own file. Finally, on the migration destination side > the initialisation and clea

Re: [PATCH for-8.0 v2 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-06 Thread Lukas Straub
Ping? This should go in rc4, there is not much time left to prepare a PULL... Best Regards, Lukas Straub On Tue, 4 Apr 2023 14:36:03 + Lukas Straub wrote: > Since ec6f3ab9, migration with compress enabled was broken, because > the compress threads use a dummy QEMUFile which just act

Re: [PATCH for-8.0 v2 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-11 Thread Lukas Straub
Ping... On Thu, 6 Apr 2023 15:21:55 + Lukas Straub wrote: > Ping? This should go in rc4, there is not much time left to prepare a > PULL... > > Best Regards, > Lukas Straub > > On Tue, 4 Apr 2023 14:36:03 + > Lukas Straub wrote: > > > Since ec6f3ab9

[PATCH 2/5] ram: Let colo_flush_ram_cache take the bitmap_mutex

2023-05-07 Thread Lukas Straub
This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/ram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 2d3fd2112a..f9e7aeda12 100644 --- a/migration/ram.c +++ b/migration/ram.c

[PATCH 4/5] multifd: Introduce a overridable revc_pages method

2023-05-07 Thread Lukas Straub
This allows to override the behaviour around recv_pages. Think of it like a "multifd_colo" child class of multifd. This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/meson.build| 1 + migration/multifd-colo.

[PATCH 0/5] multifd: Add colo support

2023-05-07 Thread Lukas Straub
Hello Everyone, These patches add support for colo to multifd. Lukas Straub (5): ram: Add public helper to set colo bitmap ram: Let colo_flush_ram_cache take the bitmap_mutex multifd: Introduce multifd-internal.h multifd: Introduce a overridable revc_pages method multifd: Add colo

[PATCH 1/5] ram: Add public helper to set colo bitmap

2023-05-07 Thread Lukas Straub
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 --- migration/ram.c | 17 ++--- migration/ram.h | 1 + 2

[PATCH 3/5] multifd: Introduce multifd-internal.h

2023-05-07 Thread Lukas Straub
Introduce multifd-internal.h so code that would normally go into multifd.c can go into an extra file. This way, multifd.c hopefully won't grow to 4000 lines like ram.c This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/mu

[PATCH 5/5] multifd: Add colo support

2023-05-07 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/multifd-colo.c | 30 +- migration/multifd.c | 11 +-- migration/multifd.h | 2 ++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/migration/multifd-colo.c b/migration/multifd-colo.c index

Re: [PULL 00/21] Migration 20230428 patches

2023-05-07 Thread Lukas Straub
On Tue, 02 May 2023 12:39:12 +0200 Juan Quintela wrote: > [...] > > my patches are only code movement and cleanups, so Lukas any clue? > > Lukas, I am going to drop the compress code for now and pass the other > patches. In the meanwhile, I am going to try to setup some machine > where I can r

Re: [PULL 00/21] Migration 20230428 patches

2023-05-08 Thread Lukas Straub
On Mon, 08 May 2023 10:12:35 +0200 Juan Quintela wrote: > Lukas Straub wrote: > > On Tue, 02 May 2023 12:39:12 +0200 > > Juan Quintela wrote: > > > >> [...] > >> > >> my patches are only code movement and cleanups, so Lukas any clue? > >&

[PATCH v2 5/6] multifd: Add the ramblock to MultiFDRecvParams

2023-05-08 Thread Lukas Straub
This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/multifd.c | 11 +-- migration/multifd.h | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index fb5e8859de

[PATCH v2 0/6] multifd: Add colo support

2023-05-08 Thread Lukas Straub
Hello Everyone, These patches add support for colo to multifd. -v2: - Split out addition of p->block - Add more comments Lukas Straub (6): ram: Add public helper to set colo bitmap ram: Let colo_flush_ram_cache take the bitmap_mutex multifd: Introduce multifd-internal.h mult

[PATCH v2 2/6] ram: Let colo_flush_ram_cache take the bitmap_mutex

2023-05-08 Thread Lukas Straub
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

[PATCH v2 4/6] multifd: Introduce a overridable revc_pages method

2023-05-08 Thread Lukas Straub
This allows to override the behaviour around recv_pages. Think of it like a "multifd_colo" child class of multifd. This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/meson.build| 1 + migration/multifd-colo.

[PATCH v2 1/6] ram: Add public helper to set colo bitmap

2023-05-08 Thread Lukas Straub
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 --- migration/ram.c | 17 ++--- migration/ram.h | 1 + 2

[PATCH v2 3/6] multifd: Introduce multifd-internal.h

2023-05-08 Thread Lukas Straub
Introduce multifd-internal.h so code that would normally go into multifd.c can go into an extra file. This way, multifd.c hopefully won't grow to 4000 lines like ram.c This will be used in the next commits to add colo support to multifd. Signed-off-by: Lukas Straub --- migration/mu

[PATCH v2 6/6] multifd: Add colo support

2023-05-08 Thread Lukas Straub
Like in the normal ram_load() path, put the received pages into the colo cache and mark the pages in the bitmap so that they will be flushed to the guest later. Signed-off-by: Lukas Straub --- migration/multifd-colo.c | 30 +- 1 file changed, 29 insertions(+), 1

Re: [PATCH] multifd: Add colo support

2023-05-11 Thread Lukas Straub
On Tue, 9 May 2023 20:15:28 +0200 Juan Quintela wrote: > From: Lukas Straub > > Like in the normal ram_load() path, put the received pages into the > colo cache and mark the pages in the bitmap so that they will be > flushed to the guest later. > > Signed

Re: [PATCH] multifd: Add colo support

2023-05-11 Thread Lukas Straub
On Thu, 11 May 2023 11:52:55 +0200 Juan Quintela wrote: > Lukas Straub wrote: > > On Tue, 9 May 2023 20:15:28 +0200 > > Juan Quintela wrote: > > > >> From: Lukas Straub > >> > >> Like in the normal ram_load() path, put the received pages in

Re: [PATCH v2] migration: Handle block device inactivation failures better

2023-04-20 Thread Lukas Straub
this patch marks s->block_inactive before attempting inactivation, > rather than after succeeding, in order to prevent any vm_start() until > it has successfully reactivated all devices. > > See also https://bugzilla.redhat.com/show_bug.cgi?id=2058982 > > Signed-off-by:

Re: [PATCH v2 0/4] COLO: improve build options

2023-04-20 Thread Lukas Straub
ex-team.ru> Hey, This series is a good idea, and looks fine to me. Maybe you can remove the #ifdef CONFIG_REPLICATION/#ifndef CONFIG_REPLICATION from migration/colo.c too while you are at it. Regards, Lukas Straub > Vladimir Sementsov-Ogievskiy (4): > block/meson.build: prefer positive

[PATCH v2 06/13] ram.c: Call update_compress_thread_counts from compress_send_queued_data

2023-04-20 Thread Lukas Straub
This makes the core compress code more independend from ram.c. Signed-off-by: Lukas Straub --- migration/ram.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index d248e1f062..3894d0ae79 100644 --- a/migration/ram.c

[PATCH v2 05/13] ram.c: Do not call save_page_header() from compress threads

2023-04-20 Thread Lukas Straub
. Signed-off-by: Lukas Straub --- migration/ram.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 5ca0f115cf..d248e1f062 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1476,17 +1476,13

[PATCH v2 00/13] migration/ram.c: Refactor compress code

2023-04-20 Thread Lukas Straub
n file" - Add Reviewed-by: Tags Lukas Straub (13): qtest/migration-test.c: Add postcopy tests with compress enabled ram.c: Let the compress threads return a CompressResult enum ram.c: Dont change param->block in the compress thread ram.c: Reset result after sending queued data ra

[PATCH v2 12/13] ram compress: Assert that the file buffer matches the result

2023-04-20 Thread Lukas Straub
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 --- migration/qemu-file.c| 11 +++ migration/qemu-file.h| 1 +

[PATCH v2 08/13] ram.c: Introduce whitespace (squash with next patch)

2023-04-20 Thread Lukas Straub
Introduce whitespace to make it easier to reroll the series. Signed-off-by: Lukas Straub --- migration/ram.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index bd3773d4c4..b95c5c720d 100644 --- a/migration/ram.c +++ b/migration/ram.c

[PATCH v2 02/13] ram.c: Let the compress threads return a CompressResult enum

2023-04-20 Thread Lukas Straub
This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 79d881f735

[PATCH v2 11/13] ram.c: Move core decompression code into its own file

2023-04-20 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub Reviewed-by: Philippe Mathieu-Daudé --- migration/ram-compress.c | 203 ++ migration/ram-compress.h | 5 + migration/ram.c | 204 --- 3 files changed

[PATCH v2 01/13] qtest/migration-test.c: Add postcopy tests with compress enabled

2023-04-20 Thread Lukas Straub
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 --- tests/qtest/migration-test.c | 83 +++- 1 file changed, 53

[PATCH v2 04/13] ram.c: Reset result after sending queued data

2023-04-20 Thread Lukas Straub
its to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 820b4ebaeb..5ca0f115cf 100644 --- a/migration/ram.c

[PATCH v2 03/13] ram.c: Dont change param->block in the compress thread

2023-04-20 Thread Lukas Straub
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 --- migration/ram.c

[PATCH v2 10/13] ram.c: Remove whitespace (squash with previous patch)

2023-04-20 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/ram.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 42d6a54132..7be09c18e3 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -529,24 +529,6 @@ static bool pss_overlap(PageSearchStatus

[PATCH v2 07/13] ram.c: Remove last ram.c dependency from the core compress code

2023-04-20 Thread Lukas Straub
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 --- migration/ram.c | 27 +-- 1 file

[PATCH v2 09/13] ram.c: Move core compression code into its own file

2023-04-20 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub --- migration/meson.build| 5 +- migration/ram-compress.c | 273 +++ migration/ram-compress.h | 65 ++ migration/ram.c | 256 +--- 4 files

[PATCH v2 13/13] ram-compress.c: Make target independent

2023-04-20 Thread Lukas Straub
Make ram-compress.c target independent. Signed-off-by: Lukas Straub --- migration/meson.build| 2 +- migration/ram-compress.c | 17 ++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/migration/meson.build b/migration/meson.build index 262e3c9754..16f642031c

[PATCH v2 14/13] migration: Initialize and cleanup decompression in migration.c

2023-04-20 Thread Lukas Straub
This fixes compress with colo. Signed-off-by: Lukas Straub --- Oops, this one slipped trough migration/migration.c | 9 + migration/ram.c | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index bda4789193

Re: [PATCH v2 4/4] configure: add --disable-colo-filters option

2023-04-20 Thread Lukas Straub
On Thu, 20 Apr 2023 09:09:48 + "Zhang, Chen" wrote: > > -Original Message- > > From: Vladimir Sementsov-Ogievskiy > > Sent: Thursday, April 20, 2023 6:53 AM > > To: qemu-devel@nongnu.org > > Cc: qemu-bl...@nongnu.org; michael.r...@amd.com; arm...@redhat.com; > > ebl...@redhat.com; ja

Re: [PATCH v2 01/13] qtest/migration-test.c: Add postcopy tests with compress enabled

2023-04-20 Thread Lukas Straub
On Thu, 20 Apr 2023 12:20:25 +0200 Juan Quintela wrote: > Lukas Straub wrote: > > 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. &

Re: [PATCH 01/19] multifd: We already account for this packet on the multifd thread

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:31 +0200 Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub > --- > migration/multifd.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/migration/multifd.c b/migration/multifd.c > index 6a59c03dd2..6053

Re: [PATCH 02/19] migration: Move ram_stats to its own file migration-stats.[ch]

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:32 +0200 Juan Quintela wrote: > There is already include/qemu/stats.h, so stats.h was a bad idea. > We want this file to not depend on anything else, we will move all the > migration counters/stats to this struct. > > Signed-off-by: Juan Quintela Rev

Re: [PATCH 03/19] migration: Rename ram_counters to mig_stats

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:33 +0200 Juan Quintela wrote: > migration_stats is just too long, and it is going to have more than > ram counters in the near future. > > Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub > --- > migration/migration-stats.c | 2 +- >

Re: [PATCH 04/19] migration: Rename RAMStats to MigrationAtomicStats

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:34 +0200 Juan Quintela wrote: > It is lousely based on MigrationStats, but that name is taken, so this > is the best one that I came with. > > Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub > --- > > If you have any good suggestion f

Re: [PATCH 05/19] migration/rdma: Split the zero page case from acct_update_position

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:35 +0200 Juan Quintela wrote: > Now that we have atomic counters, we can do it on the place that we > need it, no need to do it inside ram.c. > > Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub > --- > migration/ram.c | 12

Re: [PATCH 06/19] migration/rdma: Unfold last user of acct_update_position()

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 18:34:36 +0200 Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub > --- > migration/ram.c | 9 - > migration/ram.h | 1 - > migration/rdma.c | 4 +++- > 3 files changed, 3 insertions(+), 11 deletions(-) > >

Re: [PATCH v3 1/4] block/meson.build: prefer positive condition for replication

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 23:29:43 +0300 Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Juan Quintela > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Lukas Straub > --- > block/meson.build | 2 +- > 1 file changed, 1 insert

Re: [PATCH v3 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-27 Thread Lukas Straub
() >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. > >

Re: [PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 23:29:46 +0300 Vladimir Sementsov-Ogievskiy wrote: > Add option to not build filter-mirror, filter-rewriter and > colo-compare when they are not needed. > > There could be more agile configuration, for example add separate > options for each filter, but that may be done in fu

Re: [PATCH 17/17] qapi: Reformat doc comments to conform to current conventions

2023-04-28 Thread Lukas Straub
consistently use two spaces > to separate sentences. > > To check the generated documentation does not change, I compared the > generated HTML before and after this commit with "wdiff -3". Finds no > differences. Comparing with diff is not useful, as the reflown > parag

Re: [PULL 00/21] Migration 20230428 patches

2023-04-29 Thread Lukas Straub
;migration: Rename ram_counters to mig_stats > >migration: Rename RAMStats to MigrationAtomicStats > >migration/rdma: Split the zero page case from acct_update_position > >migration/rdma: Unfold last user of acct_update_position() > >migration: Drop unused p

  1   2   3   4   5   6   7   >