not use multifd during postcopy
cover not use multifd during postcopy
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Patch 1 does proper cleanup, otherwise we may have data corruption. Patch 2 does the main job.
BTW, current multifd synchronization method needs a cleanup. Will send another patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet migration/multifd: not use multifd during postcopy
migration/ram.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 migration/multifd: clean pages after filling packet
This is a preparation for the next patch:
not use multifd during postcopy.
Without enabling postcopy, everything looks good. While after enabling postcopy, migration may fail even not use multifd during postcopy. The reason is the pages is not properly cleared and *old* target page will continue to be transferred.
After clean pages, migration succeeds.
--- migration/ram.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
migration/ram.c +4 -2
@@ -929,10 +929,10 @@ static int multifd_send_pages(RAMState *rs) }qemu_mutex_unlock (&p->mutex); } - p->pages->used =0 ; +assert (!p->pages->used); +assert (!p->pages->block); p->packet_num = multifd_send_state->packet_num++; - p->pages->block =NULL ; multifd_send_state->pages = p->pages; p->pages = pages; transferred = ((uint64_t ) pages->used) *TARGET_PAGE_SIZE + p->packet_len;
@@ -1114,6 +1114,8 @@ static void *multifd_send_thread(void *opaque) p->flags =0 ; p->num_packets++; p->num_pages += used; + p->pages->used =0 ; + p->pages->block =NULL ;qemu_mutex_unlock (&p->mutex); trace_multifd_send(p->id, packet_num, used, flags,
Signature · 1 line
2.17.1
Re: [PATCH 1/2] migration/multifd: clean pages after filling packet
Quoted 4 lines · Wei Yang
This is a preparation for the next patch:
not use multifd during postcopy.
Quoted 8 lines
Without enabling postcopy, everything looks good. While after enabling postcopy, migration may fail even not use multifd during postcopy. The reason is the pages is not properly cleared and *old* target page will continue to be transferred.
After clean pages, migration succeeds.
Signed-off-by Wei Yang <[email protected]>
I don't like asserts, but I understand why you put them there.
PATCH 2/2 migration/multifd: not use multifd during postcopy
In reply to Wei YangWe don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Skip multifd during postcopy.
--- migration/ram.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
migration/ram.c +6 -3
@@ -2547,10 +2547,13 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss, }/* -* do not use multifd for compression as the first page in the new -* block should be posted out before sending the compressed page +* Do not use multifd for: +* 1. Compression as the first page in the new block should be posted out +* before sending the compressed page +* 2. In postcopy as one whole host page should be placed */ -if (!save_page_use_compression (rs) &&migrate_use_multifd ()) { +if (!save_page_use_compression (rs) &&migrate_use_multifd () + && !migration_in_postcopy ()) {return ram_save_multifd_page (rs, block, offset); }
Signature · 1 line
2.17.1
Re: [PATCH 2/2] migration/multifd: not use multifd during postcopy
Quoted 6 lines · Wei Yang
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Skip multifd during postcopy.
Signed-off-by Wei Yang <[email protected]>
I was working in a different implementation, but I agree with the idea.
My patch series try to decide during negotiation if multifd + everything else is setup or not.
Thanks, Juan.
Re: [PATCH 2/2] migration/multifd: not use multifd during postcopy
Quoted 6 lines · Juan Quintela
Quoted 5 lines · Wei Yang
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Skip multifd during postcopy.
Quoted 9 lines
Quoted 1 line
Signed-off-by Wei Yang <[email protected]>Reviewed-by Juan Quintela <[email protected]>I was working in a different implementation, but I agree with the idea.
My patch series try to decide during negotiation if multifd + everything else is setup or not.
Look forward your approach :-)
Quoted 1 line
Thanks, Juan.
Signature · 2 lines
Wei Yang Help you, Help me
Ping for comments.
Quoted 18 lines · Wei Yang
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Patch 1 does proper cleanup, otherwise we may have data corruption. Patch 2 does the main job.
BTW, current multifd synchronization method needs a cleanup. Will send another patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet migration/multifd: not use multifd during postcopy
migration/ram.c| 15 ++++++++++-----1 file changed, 10 insertions(+), 5 deletions(-)Signature · 1 line
2.17.1
Signature · 2 lines
Wei Yang Help you, Help me
Would this one be picked up this time?
Quoted 18 lines · Wei Yang
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Patch 1 does proper cleanup, otherwise we may have data corruption. Patch 2 does the main job.
BTW, current multifd synchronization method needs a cleanup. Will send another patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet migration/multifd: not use multifd during postcopy
migration/ram.c| 15 ++++++++++-----1 file changed, 10 insertions(+), 5 deletions(-)Signature · 1 line
2.17.1
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 1 line · Wei Yang
Would this one be picked up this time?
Happy new year to all.
Can I ask the plan for this patch set?
Quoted 24 lines · Wei Yang
Quoted 18 lines
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Patch 1 does proper cleanup, otherwise we may have data corruption. Patch 2 does the main job.
BTW, current multifd synchronization method needs a cleanup. Will send another patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet migration/multifd: not use multifd during postcopy
migration/ram.c| 15 ++++++++++-----1 file changed, 10 insertions(+), 5 deletions(-)Signature · 1 line
2.17.1Signature · 2 lines
Wei Yang Help you, Help me
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 6 lines · Wei Yang
Quoted 1 line · Wei Yang
Would this one be picked up this time?
Happy new year to all.
Can I ask the plan for this patch set?
queued
Quoted 25 lines
Quoted 25 lines · Wei Yang
Quoted 18 lines
We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure.
Patch 1 does proper cleanup, otherwise we may have data corruption. Patch 2 does the main job.
BTW, current multifd synchronization method needs a cleanup. Will send another patch set.
Wei Yang (2):
migration/multifd: clean pages after filling packet migration/multifd: not use multifd during postcopy
migration/ram.c| 15 ++++++++++-----1 file changed, 10 insertions(+), 5 deletions(-)Signature · 1 line
2.17.1Signature · 2 lines
Wei Yang Help you, Help me
Quoted 10 lines · Juan Quintela
Quoted 6 lines · Wei Yang
Quoted 1 line · Wei Yang
Would this one be picked up this time?
Happy new year to all.
Can I ask the plan for this patch set?
queued
Thanks :-)
Signature · 2 lines
Wei Yang Help you, Help me