Patchwork Add warmup phase for live migration of large memory apps

login
register
mail settings
Submitter Shribman, Aidan
Date May 12, 2011, 11:23 a.m.
Message ID <AB5A8C7661872E428D6B8E1C2DFA35085CAAEEB603@DEWDFECCR02.wdf.sap.corp>
Download mbox | patch
Permalink /patch/95285/
State New
Headers show

Comments

Shribman, Aidan - May 12, 2011, 11:23 a.m.
> From: Juan Quintela [mailto:quintela@redhat.com] 
> 
> > If there are no additional dirty pages to be sent
> > i.e. ram_save_remaining() == 0 then the migration *will* converge
> > (even though we don't want it to) see:
> 
> This should be a really idle guest to have that O:-)
> 
> But if that is the whole problem, I would change the code to make the
> case of max_downtime == 0 to mean that migration didn't converge.
> 

I agree this would be fine as surrogate for the warmup patch as I proposed. New patch based on your's / Anthony's suggestion:

---
---

Best,
Aidan
Anthony Liguori - May 12, 2011, 1:12 p.m.
On 05/12/2011 06:23 AM, Shribman, Aidan wrote:
>> From: Juan Quintela [mailto:quintela@redhat.com]
>>
>>> If there are no additional dirty pages to be sent
>>> i.e. ram_save_remaining() == 0 then the migration *will* converge
>>> (even though we don't want it to) see:
>>
>> This should be a really idle guest to have that O:-)
>>
>> But if that is the whole problem, I would change the code to make the
>> case of max_downtime == 0 to mean that migration didn't converge.
>>
>
> I agree this would be fine as surrogate for the warmup patch as I proposed. New patch based on your's / Anthony's suggestion:
>
> ---
> diff --git a/arch_init.c b/arch_init.c
> index 4486925..9a35411 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -295,7 +295,8 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
>
>       expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
>
> -    return (stage == 2)&&  (expected_time<= migrate_max_downtime());
> +    return (stage == 2)&&  migrate_max_downtime()&&
> +        (expected_time<= migrate_max_downtime());
>   }


This is better but let's make sure to document this behavior (and please 
include a Signed-off-by: in the next patch).

Regards,

Anthony Liguori

>   static inline void *host_from_stream_offset(QEMUFile *f,
> ---
>
> Best,
> Aidan

Patch

diff --git a/arch_init.c b/arch_init.c
index 4486925..9a35411 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -295,7 +295,8 @@  int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
 
     expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
 
-    return (stage == 2) && (expected_time <= migrate_max_downtime());
+    return (stage == 2) && migrate_max_downtime() &&
+        (expected_time <= migrate_max_downtime());
 }
 
 static inline void *host_from_stream_offset(QEMUFile *f,