/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simgrid/plugins/dvfs.h"
-#include "simgrid/plugins/load.h"
-#include "simgrid/s4u/Engine.hpp"
+#include <simgrid/plugins/dvfs.h>
+#include <simgrid/plugins/load.h>
+#include <xbt/config.hpp>
+
#include "src/internal_config.h" // HAVE_SMPI
-#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/plugins/vm/VirtualMachineImpl.hpp"
+#include "src/surf/network_interface.hpp"
#if HAVE_SMPI
+#include "src/smpi/include/smpi_request.hpp"
#include "src/smpi/plugins/ampi/ampi.hpp"
#endif
-#include <xbt/config.hpp>
#include <boost/algorithm/string.hpp>
-#if HAVE_SMPI
-#include "src/smpi/include/smpi_request.hpp"
-#endif
SIMGRID_REGISTER_PLUGIN(host_dvfs, "Dvfs support", &sg_host_dvfs_plugin_init)
*/
// Load is now < freq_up_threshold; exclude pstate 0 (the fastest)
// because pstate 0 can only be selected if load > freq_up_threshold_
- unsigned long new_pstate = static_cast<unsigned long>(get_max_pstate() - load * (get_max_pstate() + 1));
+ auto new_pstate = get_max_pstate() - static_cast<unsigned long>(load) * (get_max_pstate() + 1);
if (new_pstate < get_min_pstate())
new_pstate = get_min_pstate();
get_host()->set_pstate(new_pstate);