From: Martin Quinson Date: Tue, 11 Aug 2020 23:26:36 +0000 (+0200) Subject: Ignore suspended VMs when computing the next_occurring_event at the VM level (patch... X-Git-Tag: v3.26~460 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/91954c5dec0ca32d2b45587f0b6e805d3d6e55d9 Ignore suspended VMs when computing the next_occurring_event at the VM level (patch by Fred) --- diff --git a/src/plugins/vm/VirtualMachineImpl.cpp b/src/plugins/vm/VirtualMachineImpl.cpp index 4fab967633..80f1689d51 100644 --- a/src/plugins/vm/VirtualMachineImpl.cpp +++ b/src/plugins/vm/VirtualMachineImpl.cpp @@ -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