* Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished
@ 2022-09-10 10:47 Seaway Liu(刘海伟)
2022-09-10 10:58 ` Vladimir Sementsov-Ogievskiy
0 siblings, 1 reply; 4+ messages in thread
From: Seaway Liu(刘海伟) @ 2022-09-10 10:47 UTC (permalink / raw)
To: vsementsov@yandex-team.ru, liuhaiwei9699@126.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: stefanha@redhat.com, fam@euphon.net, eblake@redhat.com,
jsnow@redhat.com, quintela@redhat.com, dgilbert@redhat.com
hi,i have a question
if failed in migration using post-copy mode,is there some way to restore the memory data back to soucre VM?
发自我的小米
在 Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,2022年9月10日 下午6:18写道:
On 9/10/22 09:35, liuhaiwei wrote:
> From: liuhaiwei <liuhaiwei@inspur.com>
>
> bug description as https://gitlab.com/qemu-project/qemu/-/issues/1203
> Usually,we use the precopy or postcopy mode to migrate block dirty bitmap.
> but if block-dirty-bitmap size more than threshold size,we cannot entry the migration_completion in migration_iteration_run function
> To solve this problem, we can setting the pending size to a fake value(threshold-1 or 0) to tell migration_iteration_run function to entry the migration_completion,if pending size > threshold size
>
Actually, bitmaps migrate in postcopy. So, you should start postcopy for it to work (qmp command migrate-start-postcopy). This command simply set the boolean variable, so that in migration_iteration_run() we'll move to postcopy when needed. So, you can start this command immediately after migrate command, or even before it, but after setting the "dirty-bitmaps" capability.
Fake pending is a wrong thing to do, it means that you will make downtime to be larger than expected.
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished
2022-09-10 10:47 [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished Seaway Liu(刘海伟)
@ 2022-09-10 10:58 ` Vladimir Sementsov-Ogievskiy
2022-09-11 2:08 ` liuhaiwei9699
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-09-10 10:58 UTC (permalink / raw)
To: Seaway Liu(刘海伟), liuhaiwei9699@126.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: stefanha@redhat.com, fam@euphon.net, eblake@redhat.com,
jsnow@redhat.com, quintela@redhat.com, dgilbert@redhat.com
Hi!
On 9/10/22 13:47, Seaway Liu(刘海伟) wrote:
> hi,i have a question
> if failed in migration using post-copy mode,is there some way to restore the memory data back to soucre VM?
>
As far as I understand, no, there is not.
Postcopy started actually means: target has started. So, RAM is touched by target VM process, no way to rollback.
Still, things are not so bad: when you enable dirty-bitmaps capability, but not postcopy-ram capability, RAM is migrated in precopy as usual. So, when target started, the only thing that is not yet migrated is dirty bitmap. So, in worst case (migration failure after postcopy started) you'll loose your dirty bitmap. VM is migrated and normally running on target. Unfinished bitmaps on target are automatically released (see cancel_incoming_locked()). So, in worst case you'll have to start your incremental backup chain from a new full-backup.
>
>
> 发自我的小米
> 在 Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,2022年9月10日 下午6:18写道:
>
> On 9/10/22 09:35, liuhaiwei wrote:
>> From: liuhaiwei <liuhaiwei@inspur.com>
>>
>> bug description as https://gitlab.com/qemu-project/qemu/-/issues/1203
>> Usually,we use the precopy or postcopy mode to migrate block dirty bitmap.
>> but if block-dirty-bitmap size more than threshold size,we cannot entry the migration_completion in migration_iteration_run function
>> To solve this problem, we can setting the pending size to a fake value(threshold-1 or 0) to tell migration_iteration_run function to entry the migration_completion,if pending size > threshold size
>>
>
>
> Actually, bitmaps migrate in postcopy. So, you should start postcopy for it to work (qmp command migrate-start-postcopy). This command simply set the boolean variable, so that in migration_iteration_run() we'll move to postcopy when needed. So, you can start this command immediately after migrate command, or even before it, but after setting the "dirty-bitmaps" capability.
>
> Fake pending is a wrong thing to do, it means that you will make downtime to be larger than expected.
>
> --
> Best regards,
> Vladimir
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished
2022-09-10 10:58 ` Vladimir Sementsov-Ogievskiy
@ 2022-09-11 2:08 ` liuhaiwei9699
0 siblings, 0 replies; 4+ messages in thread
From: liuhaiwei9699 @ 2022-09-11 2:08 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy
Cc: Seaway Liu(刘海伟), qemu-devel@nongnu.org,
qemu-block@nongnu.org, stefanha@redhat.com, fam@euphon.net,
eblake@redhat.com, jsnow@redhat.com, quintela@redhat.com,
dgilbert@redhat.com
[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]
sometimes ,post-copy mode is not the best choice. For instance, Supposing migrate process will take ten minutes,but network may be interruptted In this process .
If it does happenthe , memory data of VM will be splitted into two parts, and will not be rollback.This is a bad situation
so migrate-start-postcopy will not be setted in conservative scenario. In this case, the migration with block dirty bitmap may not be finished.
The migration of block dirty bitmap should not dependent on post-copy or pre-copy mode.
At 2022-09-10 18:58:12, "Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru> wrote:
>Hi!
>
>On 9/10/22 13:47, Seaway Liu(刘海伟) wrote:
>> hi,i have a question
>> if failed in migration using post-copy mode,is there some way to restore the memory data back to soucre VM?
>>
>
>
>As far as I understand, no, there is not.
>
>Postcopy started actually means: target has started. So, RAM is touched by target VM process, no way to rollback.
>
>Still, things are not so bad: when you enable dirty-bitmaps capability, but not postcopy-ram capability, RAM is migrated in precopy as usual. So, when target started, the only thing that is not yet migrated is dirty bitmap. So, in worst case (migration failure after postcopy started) you'll loose your dirty bitmap. VM is migrated and normally running on target. Unfinished bitmaps on target are automatically released (see cancel_incoming_locked()). So, in worst case you'll have to start your incremental backup chain from a new full-backup.
>
>>
>>
>> 发自我的小米
>> 在 Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,2022年9月10日 下午6:18写道:
>>
>> On 9/10/22 09:35, liuhaiwei wrote:
>>> From: liuhaiwei <liuhaiwei@inspur.com>
>>>
>>> bug description as https://gitlab.com/qemu-project/qemu/-/issues/1203
>>> Usually,we use the precopy or postcopy mode to migrate block dirty bitmap.
>>> but if block-dirty-bitmap size more than threshold size,we cannot entry the migration_completion in migration_iteration_run function
>>> To solve this problem, we can setting the pending size to a fake value(threshold-1 or 0) to tell migration_iteration_run function to entry the migration_completion,if pending size > threshold size
>>>
>>
>>
>> Actually, bitmaps migrate in postcopy. So, you should start postcopy for it to work (qmp command migrate-start-postcopy). This command simply set the boolean variable, so that in migration_iteration_run() we'll move to postcopy when needed. So, you can start this command immediately after migrate command, or even before it, but after setting the "dirty-bitmaps" capability.
>>
>> Fake pending is a wrong thing to do, it means that you will make downtime to be larger than expected.
>>
>> --
>> Best regards,
>> Vladimir
>
>
>--
>Best regards,
>Vladimir
[-- Attachment #2: Type: text/html, Size: 3473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished
2022-09-10 10:18 ` Vladimir Sementsov-Ogievskiy
@ 2022-09-15 1:28 ` liuhaiwei9699
0 siblings, 0 replies; 4+ messages in thread
From: liuhaiwei9699 @ 2022-09-15 1:28 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy
Cc: qemu-devel, qemu-block, stefanha, fam, eblake, jsnow, quintela,
dgilbert, liuhaiwei
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
Hi ,Vladimir
sometimes ,post-copy mode is not the best choice. For instance, Supposing migrate process will take ten minutes,but network may be interruptted In this process .
If it does happenthe , memory data of VM will be splitted into two parts, and will not be rollback.This is a bad situation
so migrate-start-postcopy will not be setted in conservative scenario. In this case, the migration with block dirty bitmap may not be finished.
I think migration of block dirty bitmap should not dependent on post-copy or pre-copy mode.
Best regards
At 2022-09-10 18:18:04, "Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru> wrote:
>On 9/10/22 09:35, liuhaiwei wrote:
>> From: liuhaiwei <liuhaiwei@inspur.com>
>>
>> bug description as https://gitlab.com/qemu-project/qemu/-/issues/1203
>> Usually,we use the precopy or postcopy mode to migrate block dirty bitmap.
>> but if block-dirty-bitmap size more than threshold size,we cannot entry the migration_completion in migration_iteration_run function
>> To solve this problem, we can setting the pending size to a fake value(threshold-1 or 0) to tell migration_iteration_run function to entry the migration_completion,if pending size > threshold size
>>
>
>
>Actually, bitmaps migrate in postcopy. So, you should start postcopy for it to work (qmp command migrate-start-postcopy). This command simply set the boolean variable, so that in migration_iteration_run() we'll move to postcopy when needed. So, you can start this command immediately after migrate command, or even before it, but after setting the "dirty-bitmaps" capability.
>
>Fake pending is a wrong thing to do, it means that you will make downtime to be larger than expected.
>
>--
>Best regards,
>Vladimir
[-- Attachment #2: Type: text/html, Size: 2865 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-15 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-10 10:47 [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished Seaway Liu(刘海伟)
2022-09-10 10:58 ` Vladimir Sementsov-Ogievskiy
2022-09-11 2:08 ` liuhaiwei9699
-- strict thread matches above, loose matches on Subject: below --
2022-09-10 6:35 liuhaiwei
2022-09-10 10:18 ` Vladimir Sementsov-Ogievskiy
2022-09-15 1:28 ` liuhaiwei9699
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).