diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-02 23:23:55 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-03 10:37:34 +0200 |
| commit | 84468f4e3a331d7ea073ac7033b3d9937168ed9f (patch) | |
| tree | 6f596eef8a39411f9fba3b3c845112d80f47b93b /opendc-compute | |
| parent | 1ee02377aca356a99506ac247b376d7cf070048d (diff) | |
simulator: Split CPUFreq subsystem in compute simulator
This change splits the functionality present in the CPUFreq subsystem of
the compute simulation. Currently, the DVFS functionality is embedded in
SimBareMetalMachine. However, this functionality should not exist within
the firmware layer of a machine. Instead, the operating system should
perform this logic (in OpenDC this should be the hypervisor).
Furthermore, this change moves the scaling driver into the power
package. The power driver is a machine/firmware specific implementation
that computes the power consumption of a machine.
Diffstat (limited to 'opendc-compute')
| -rw-r--r-- | opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index 89016c55..d36717af 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -32,14 +32,14 @@ import org.opendc.compute.api.ServerState import org.opendc.compute.service.driver.* import org.opendc.simulator.compute.* import org.opendc.simulator.compute.cpufreq.PerformanceScalingGovernor -import org.opendc.simulator.compute.cpufreq.ScalingDriver import org.opendc.simulator.compute.cpufreq.ScalingGovernor -import org.opendc.simulator.compute.cpufreq.SimpleScalingDriver import org.opendc.simulator.compute.interference.IMAGE_PERF_INTERFERENCE_MODEL import org.opendc.simulator.compute.interference.PerformanceInterferenceModel import org.opendc.simulator.compute.model.MemoryUnit import org.opendc.simulator.compute.power.ConstantPowerModel +import org.opendc.simulator.compute.power.PowerDriver import org.opendc.simulator.compute.power.PowerModel +import org.opendc.simulator.compute.power.SimplePowerDriver import org.opendc.simulator.failures.FailureDomain import org.opendc.simulator.resources.SimResourceInterpreter import java.time.Clock @@ -60,7 +60,7 @@ public class SimHost( meter: Meter, hypervisor: SimHypervisorProvider, scalingGovernor: ScalingGovernor, - scalingDriver: ScalingDriver, + scalingDriver: PowerDriver, private val mapper: SimWorkloadMapper = SimMetaWorkloadMapper(), ) : Host, FailureDomain, AutoCloseable { @@ -75,7 +75,7 @@ public class SimHost( hypervisor: SimHypervisorProvider, powerModel: PowerModel = ConstantPowerModel(0.0), mapper: SimWorkloadMapper = SimMetaWorkloadMapper(), - ) : this(uid, name, model, meta, context, clock, meter, hypervisor, PerformanceScalingGovernor(), SimpleScalingDriver(powerModel), mapper) + ) : this(uid, name, model, meta, context, clock, meter, hypervisor, PerformanceScalingGovernor(), SimplePowerDriver(powerModel), mapper) /** * The [CoroutineScope] of the host bounded by the lifecycle of the host. @@ -105,7 +105,7 @@ public class SimHost( /** * The machine to run on. */ - public val machine: SimBareMetalMachine = SimBareMetalMachine(interpreter, model, scalingGovernor, scalingDriver) + public val machine: SimBareMetalMachine = SimBareMetalMachine(interpreter, model, scalingDriver) /** * The hypervisor to run multiple workloads. |
