Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix weird bug on pstate changes with VM
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 3 Mar 2022 03:36:17 +0000 (04:36 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 3 Mar 2022 03:36:17 +0000 (04:36 +0100)
at VM creation we did this:

/* We create cpu_action corresponding to a VM process on the host
operating system. */
action_ = physical_host_->get_cpu()->execution_start(0,core_amount_)

but in the version of execution with 2 parameters, the second one is a
user_bound not the desired amount of cores!!
This leads to entering a special in Cas01::on_speed_change and change
the bound to 1 instead of the new speed! (cpu_cas01.cpp:92)

src/kernel/resource/VirtualMachineImpl.cpp

index ae03dc3..fdb27a1 100644 (file)
@@ -184,7 +184,7 @@ VirtualMachineImpl::VirtualMachineImpl(const std::string& name, s4u::VirtualMach
    * The value for GUESTOS_NOISE corresponds to the cost of the global action associated to the VM.  It corresponds to
    * the cost of a VM running no tasks.
    */
-  action_ = physical_host_->get_cpu()->execution_start(0, core_amount_);
+  action_ = physical_host_->get_cpu()->execution_start(0, core_amount_, 0);
 
   // It's empty for now, so it should not request resources in the PM
   update_action_weight();