* [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration
@ 2017-09-21 12:32 Peter Lieven
2017-09-22 10:22 ` Stefan Hajnoczi
2017-09-25 20:53 ` [Qemu-devel] [Qemu-stable] " Michael Roth
0 siblings, 2 replies; 5+ messages in thread
From: Peter Lieven @ 2017-09-21 12:32 UTC (permalink / raw)
To: qemu-devel
Cc: quintela, famz, stefanha, dgilbert, pbonzini, Peter Lieven,
qemu-stable
auto-converge and block migration currently do not play well together.
During block migration the auto-converge logic detects that ram
migration makes no progress and thus throttles down the vm until
it nearly stalls completely. Avoid this by disabling the throttling
logic during the bulk phase of the block migration.
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
---
migration/block.c | 5 +++++
migration/block.h | 7 +++++++
migration/ram.c | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/migration/block.c b/migration/block.c
index 9171f60..606ad4d 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -161,6 +161,11 @@ int blk_mig_active(void)
return !QSIMPLEQ_EMPTY(&block_mig_state.bmds_list);
}
+int blk_mig_bulk_active(void)
+{
+ return blk_mig_active() && !block_mig_state.bulk_completed;
+}
+
uint64_t blk_mig_bytes_transferred(void)
{
BlkMigDevState *bmds;
diff --git a/migration/block.h b/migration/block.h
index 22ebe94..3178609 100644
--- a/migration/block.h
+++ b/migration/block.h
@@ -16,6 +16,7 @@
#ifdef CONFIG_LIVE_BLOCK_MIGRATION
int blk_mig_active(void);
+int blk_mig_bulk_active(void);
uint64_t blk_mig_bytes_transferred(void);
uint64_t blk_mig_bytes_remaining(void);
uint64_t blk_mig_bytes_total(void);
@@ -25,6 +26,12 @@ static inline int blk_mig_active(void)
{
return false;
}
+
+static inline int blk_mig_bulk_active(void)
+{
+ return false;
+}
+
static inline uint64_t blk_mig_bytes_transferred(void)
{
return 0;
diff --git a/migration/ram.c b/migration/ram.c
index e18b3e2..720470e 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -46,6 +46,7 @@
#include "exec/ram_addr.h"
#include "qemu/rcu_queue.h"
#include "migration/colo.h"
+#include "migration/block.h"
/***********************************************************/
/* ram save/restore */
@@ -623,7 +624,7 @@ static void migration_bitmap_sync(RAMState *rs)
/ (end_time - rs->time_last_bitmap_sync);
bytes_xfer_now = ram_counters.transferred;
- if (migrate_auto_converge()) {
+ if (migrate_auto_converge() && !blk_mig_bulk_active()) {
/* The following detection logic can be refined later. For now:
Check to see if the dirtied bytes is 50% more than the approx.
amount of bytes that just got transferred since the last time we
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration
2017-09-21 12:32 [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration Peter Lieven
@ 2017-09-22 10:22 ` Stefan Hajnoczi
2017-09-25 20:53 ` [Qemu-devel] [Qemu-stable] " Michael Roth
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2017-09-22 10:22 UTC (permalink / raw)
To: Peter Lieven; +Cc: qemu-devel, quintela, famz, dgilbert, pbonzini, qemu-stable
On Thu, Sep 21, 2017 at 02:32:32PM +0200, Peter Lieven wrote:
> auto-converge and block migration currently do not play well together.
> During block migration the auto-converge logic detects that ram
> migration makes no progress and thus throttles down the vm until
> it nearly stalls completely. Avoid this by disabling the throttling
> logic during the bulk phase of the block migration.
Please include the rationale in a comment here:
> - if (migrate_auto_converge()) {
> + if (migrate_auto_converge() && !blk_mig_bulk_active()) {
That way it's clear why auto-converge isn't enabled when block migration
is active.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-stable] [PATCH] migration: disable auto-converge during bulk block migration
2017-09-21 12:32 [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration Peter Lieven
2017-09-22 10:22 ` Stefan Hajnoczi
@ 2017-09-25 20:53 ` Michael Roth
2017-09-26 10:19 ` Peter Lieven
2017-09-28 12:04 ` Peter Lieven
1 sibling, 2 replies; 5+ messages in thread
From: Michael Roth @ 2017-09-25 20:53 UTC (permalink / raw)
To: Peter Lieven, qemu-devel
Cc: quintela, dgilbert, qemu-stable, stefanha, pbonzini
Quoting Peter Lieven (2017-09-21 07:32:32)
> auto-converge and block migration currently do not play well together.
> During block migration the auto-converge logic detects that ram
> migration makes no progress and thus throttles down the vm until
> it nearly stalls completely. Avoid this by disabling the throttling
> logic during the bulk phase of the block migration.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Lieven <pl@kamp.de>
FYI: this patch has been tagged for stable 2.10.1, but is not yet
upstream. Patch freeze for 2.10.1 is September 27th.
> ---
> migration/block.c | 5 +++++
> migration/block.h | 7 +++++++
> migration/ram.c | 3 ++-
> 3 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/migration/block.c b/migration/block.c
> index 9171f60..606ad4d 100644
> --- a/migration/block.c
> +++ b/migration/block.c
> @@ -161,6 +161,11 @@ int blk_mig_active(void)
> return !QSIMPLEQ_EMPTY(&block_mig_state.bmds_list);
> }
>
> +int blk_mig_bulk_active(void)
> +{
> + return blk_mig_active() && !block_mig_state.bulk_completed;
> +}
> +
> uint64_t blk_mig_bytes_transferred(void)
> {
> BlkMigDevState *bmds;
> diff --git a/migration/block.h b/migration/block.h
> index 22ebe94..3178609 100644
> --- a/migration/block.h
> +++ b/migration/block.h
> @@ -16,6 +16,7 @@
>
> #ifdef CONFIG_LIVE_BLOCK_MIGRATION
> int blk_mig_active(void);
> +int blk_mig_bulk_active(void);
> uint64_t blk_mig_bytes_transferred(void);
> uint64_t blk_mig_bytes_remaining(void);
> uint64_t blk_mig_bytes_total(void);
> @@ -25,6 +26,12 @@ static inline int blk_mig_active(void)
> {
> return false;
> }
> +
> +static inline int blk_mig_bulk_active(void)
> +{
> + return false;
> +}
> +
> static inline uint64_t blk_mig_bytes_transferred(void)
> {
> return 0;
> diff --git a/migration/ram.c b/migration/ram.c
> index e18b3e2..720470e 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -46,6 +46,7 @@
> #include "exec/ram_addr.h"
> #include "qemu/rcu_queue.h"
> #include "migration/colo.h"
> +#include "migration/block.h"
>
> /***********************************************************/
> /* ram save/restore */
> @@ -623,7 +624,7 @@ static void migration_bitmap_sync(RAMState *rs)
> / (end_time - rs->time_last_bitmap_sync);
> bytes_xfer_now = ram_counters.transferred;
>
> - if (migrate_auto_converge()) {
> + if (migrate_auto_converge() && !blk_mig_bulk_active()) {
> /* The following detection logic can be refined later. For now:
> Check to see if the dirtied bytes is 50% more than the approx.
> amount of bytes that just got transferred since the last time we
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-stable] [PATCH] migration: disable auto-converge during bulk block migration
2017-09-25 20:53 ` [Qemu-devel] [Qemu-stable] " Michael Roth
@ 2017-09-26 10:19 ` Peter Lieven
2017-09-28 12:04 ` Peter Lieven
1 sibling, 0 replies; 5+ messages in thread
From: Peter Lieven @ 2017-09-26 10:19 UTC (permalink / raw)
To: Michael Roth, qemu-devel
Cc: quintela, qemu-stable, dgilbert, stefanha, pbonzini
Am 25.09.2017 um 22:53 schrieb Michael Roth:
> Quoting Peter Lieven (2017-09-21 07:32:32)
>> auto-converge and block migration currently do not play well together.
>> During block migration the auto-converge logic detects that ram
>> migration makes no progress and thus throttles down the vm until
>> it nearly stalls completely. Avoid this by disabling the throttling
>> logic during the bulk phase of the block migration.
>>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Peter Lieven <pl@kamp.de>
> FYI: this patch has been tagged for stable 2.10.1, but is not yet
> upstream. Patch freeze for 2.10.1 is September 27th.
I just send a V2 of the patch adding a comment to the code
why auto-converge is disabled during bulk block migration.
Maybe someone can review it and pick it up.
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-stable] [PATCH] migration: disable auto-converge during bulk block migration
2017-09-25 20:53 ` [Qemu-devel] [Qemu-stable] " Michael Roth
2017-09-26 10:19 ` Peter Lieven
@ 2017-09-28 12:04 ` Peter Lieven
1 sibling, 0 replies; 5+ messages in thread
From: Peter Lieven @ 2017-09-28 12:04 UTC (permalink / raw)
To: Michael Roth, qemu-devel
Cc: quintela, qemu-stable, dgilbert, stefanha, pbonzini
Am 25.09.2017 um 22:53 schrieb Michael Roth:
> Quoting Peter Lieven (2017-09-21 07:32:32)
>> auto-converge and block migration currently do not play well together.
>> During block migration the auto-converge logic detects that ram
>> migration makes no progress and thus throttles down the vm until
>> it nearly stalls completely. Avoid this by disabling the throttling
>> logic during the bulk phase of the block migration.
>>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Peter Lieven <pl@kamp.de>
> FYI: this patch has been tagged for stable 2.10.1, but is not yet
> upstream. Patch freeze for 2.10.1 is September 27th.
Hi Michael,
the patch went upstream yesterday.
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-28 12:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 12:32 [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration Peter Lieven
2017-09-22 10:22 ` Stefan Hajnoczi
2017-09-25 20:53 ` [Qemu-devel] [Qemu-stable] " Michael Roth
2017-09-26 10:19 ` Peter Lieven
2017-09-28 12:04 ` Peter Lieven
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).