diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-05 20:23:45 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-21 11:31:15 +0200 |
| commit | 35ec0060fb73149e687655851a682f12486f0086 (patch) | |
| tree | 8e6a4f5e14b00584d4054e3a21dc27ddda745b44 /opendc-compute | |
| parent | 2ec5e8f1e44239916779655d4d68a9c6dae8e894 (diff) | |
refactor(sim/compute): Move interference logic into VmInterferenceMember
This change updates the design of the VM interference model, where we
move more of the logic into the `VmInterferenceMember` interface. This
removes the dependency on the `VmInterferenceModel` for the hypervisor
interface.
Diffstat (limited to 'opendc-compute')
| -rw-r--r-- | opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 4 |
1 files changed, 2 insertions, 2 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 908353f0..628f324b 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 @@ -92,7 +92,7 @@ public class SimHost( * The hypervisor to run multiple workloads. */ private val hypervisor: SimHypervisor = hypervisorProvider - .create(engine, scalingGovernor = scalingGovernor, interferenceDomain = interferenceDomain) + .create(engine, scalingGovernor = scalingGovernor) /** * The virtual machines running on the hypervisor. @@ -144,7 +144,7 @@ public class SimHost( val guest = guests.computeIfAbsent(server) { key -> require(canFit(key)) { "Server does not fit" } - val interferenceKey = interferenceDomain?.createKey(key.name) + val interferenceKey = interferenceDomain?.getMember(key.name) val machine = hypervisor.newMachine(key.flavor.toMachineModel(), interferenceKey) val newGuest = Guest( scope.coroutineContext, |
