Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics in the VM/energy code
[simgrid.git] / src / surf / vm_hl13.cpp
index 768c7ac..f35a2c7 100644 (file)
@@ -132,35 +132,6 @@ double VMHL13Model::shareResources(double now)
   if (min_by_sto >= 0.0 && min_by_sto < ret)
        ret = min_by_sto;
 
-  /* FIXME: 3. do we have to re-initialize our cpu_action object? */
-#if 0
-  /* iterate for all virtual machines */
-  for (VMModel::vm_list_t::iterator iter =
-         VMModel::ws_vms.begin();
-       iter !=  VMModel::ws_vms.end(); ++iter) {
-
-    {
-#if 0
-      VM2013 *ws_vm2013 = static_cast<VM2013Ptr>(&*iter);
-      XBT_INFO("cost %f remains %f start %f finish %f", ws_vm2013->cpu_action->cost,
-          ws_vm2013->cpu_action->remains,
-          ws_vm2013->cpu_action->start,
-          ws_vm2013->cpu_action->finish
-          );
-#endif
-#if 0
-      void *ind_sub_host = xbt_lib_get_elm_or_null(host_lib, ws_vm2013->sub_ws->generic_resource.getName);
-      surf_cpu_model_pm->action_unref(ws_vm2013->cpu_action);
-      /* FIXME: this means busy loop? */
-      // ws_vm2013->cpu_action = surf_cpu_model_pm->extension.cpu.execute(ind_sub_host, GUESTOS_NOISE);
-      ws_vm2013->cpu_action = surf_cpu_model_pm->extension.cpu.execute(ind_sub_host, 0);
-#endif
-
-    }
-  }
-#endif
-
-
   return ret;
 }
 
@@ -237,7 +208,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, xbt_dict_t props,
       NULL,                       // host->state_trace,
       NULL);                       // host->properties,
 
-       p_cpu->setVirtual(sub_cpu);
+       p_cpu->setPhysicalCPU(sub_cpu);
 
   /* We create cpu_action corresponding to a VM process on the host operating system. */
   /* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
@@ -337,16 +308,6 @@ void VMHL13::migrate(surf_resource_t ind_dst_pm)
 
    /* Update vcpu's action for the new pm */
    {
-#if 0
-     XBT_INFO("cpu_action->remains %g", p_action->remains);
-     XBT_INFO("cost %f remains %f start %f finish %f", p_action->cost,
-         p_action->remains,
-         p_action->start,
-         p_action->finish
-         );
-     XBT_INFO("cpu_action state %d", surf_action_get_state(p_action));
-#endif
-
      /* create a cpu action bound to the pm model at the destination. */
      CpuAction *new_cpu_action = static_cast<CpuAction*>(
                                            static_cast<Cpu*>(sg_host_surfcpu(ind_dst_pm))->execute(0));
@@ -410,10 +371,3 @@ Action *VMHL13::execute(double size)
 Action *VMHL13::sleep(double duration) {
   return p_cpu->sleep(duration);
 }
-
-/**********
- * Action *
- **********/
-
-//FIME:: handle action cancel
-