Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ignore suspended VMs when computing the next_occurring_event at the VM level (patch...
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 11 Aug 2020 23:26:36 +0000 (01:26 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 11 Aug 2020 23:26:36 +0000 (01:26 +0200)
src/plugins/vm/VirtualMachineImpl.cpp

index 4fab967..80f1689 100644 (file)
@@ -139,6 +139,9 @@ double VMModel::next_occurring_event(double now)
 
   /* iterate for all virtual machines */
   for (s4u::VirtualMachine* const& ws_vm : VirtualMachineImpl::allVms_) {
+    if (ws_vm->get_state() == s4u::VirtualMachine::state::SUSPENDED) // Ignore suspended VMs
+      continue;
+
     const kernel::resource::Cpu* cpu = ws_vm->pimpl_cpu;
 
     // solved_value below is X1 in comment above: what this VM got in the sharing on the PM