Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the default max_downtime 30ms
authorTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Wed, 24 Apr 2013 16:19:36 +0000 (18:19 +0200)
committerTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Wed, 24 Apr 2013 16:19:36 +0000 (18:19 +0200)
src/msg/msg_vm.c

index a5331a5..34cefc2 100644 (file)
@@ -561,12 +561,20 @@ static int migration_tx_fun(int argc, char *argv[])
   const long ramsize        = params.ramsize;
   const long devsize        = params.devsize;
   const int skip_stage2     = params.skip_stage2;
-  const double max_downtime = params.max_downtime;
   const double dp_rate      = params.dp_rate;
   const double dp_cap       = params.dp_cap;
   const double mig_speed    = params.mig_speed;
   double remaining_size = ramsize + devsize;
-  double threshold = max_downtime * 125 * 1000 * 1000;
+
+  double max_downtime = params.max_downtime;
+  if (max_downtime == 0) {
+    XBT_WARN("use the default max_downtime value 30ms");
+    max_downtime = 0.03;
+  }
+
+  double threshold = max_downtime * 125 * 1024 * 1024;
+
+  /* setting up parameters has done */
 
 
   if (ramsize == 0)