SimGrid
3.13
Versatile Simulation of Distributed Systems
|
#include "smx_private.h"
#include "mc/mc.h"
#include "src/surf/virtual_machine.hpp"
#include "src/surf/HostImpl.hpp"
Functions | |
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (simix_vm, simix,"Logging specific to SIMIX (vms)") | |
sg_host_t | SIMIX_vm_create (const char *name, sg_host_t ind_phys_host) |
Internal function to create a SIMIX host. More... | |
static long | host_get_ramsize (sg_host_t vm, int *overcommit) |
static int | __can_be_started (sg_host_t vm) |
void | SIMIX_vm_start (sg_host_t ind_vm) |
e_surf_vm_state_t | SIMIX_vm_get_state (sg_host_t ind_vm) |
void | SIMIX_vm_migrate (sg_host_t ind_vm, sg_host_t ind_dst_pm) |
Function to migrate a SIMIX VM host. More... | |
void | SIMIX_vm_migratefrom_resumeto (sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) |
Encompassing simcall to prevent the removal of the src or the dst node at the end of a VM migration The simcall actually invokes the following calls: simcall_vm_set_affinity(vm, src_pm, 0); simcall_vm_migrate(vm, dst_pm); simcall_vm_resume(vm);. More... | |
void * | SIMIX_vm_get_pm (sg_host_t ind_vm) |
Function to get the physical host of the given SIMIX VM host. More... | |
void | SIMIX_vm_set_bound (sg_host_t ind_vm, double bound) |
Function to set the CPU bound of the given SIMIX VM host. More... | |
void | SIMIX_vm_set_affinity (sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) |
Function to set the CPU affinity of the given SIMIX VM host. More... | |
void | SIMIX_vm_suspend (sg_host_t ind_vm, smx_process_t issuer) |
Function to suspend a SIMIX VM host. More... | |
void | simcall_HANDLER_vm_suspend (smx_simcall_t simcall, sg_host_t ind_vm) |
void | SIMIX_vm_resume (sg_host_t ind_vm, smx_process_t issuer) |
Function to resume a SIMIX VM host. More... | |
void | simcall_HANDLER_vm_resume (smx_simcall_t simcall, sg_host_t ind_vm) |
void | SIMIX_vm_save (sg_host_t ind_vm, smx_process_t issuer) |
Function to save a SIMIX VM host. More... | |
void | simcall_HANDLER_vm_save (smx_simcall_t simcall, sg_host_t ind_vm) |
void | SIMIX_vm_restore (sg_host_t ind_vm, smx_process_t issuer) |
Function to restore a SIMIX VM host. More... | |
void | simcall_HANDLER_vm_restore (smx_simcall_t simcall, sg_host_t ind_vm) |
void | SIMIX_vm_shutdown (sg_host_t ind_vm, smx_process_t issuer) |
Function to shutdown a SIMIX VM host. More... | |
void | simcall_HANDLER_vm_shutdown (smx_simcall_t simcall, sg_host_t ind_vm) |
void | SIMIX_vm_destroy (sg_host_t ind_vm) |
Function to destroy a SIMIX VM host. More... | |
XBT_LOG_NEW_DEFAULT_SUBCATEGORY | ( | simix_vm | , |
simix | , | ||
"Logging specific to SIMIX (vms)" | |||
) |
Internal function to create a SIMIX host.
name | name of the host to create |
data | some user data (may be NULL) |
|
static |
|
static |
e_surf_vm_state_t SIMIX_vm_get_state | ( | sg_host_t | ind_vm | ) |
Function to migrate a SIMIX VM host.
host | the vm host to migrate (a sg_host_t) |
Encompassing simcall to prevent the removal of the src or the dst node at the end of a VM migration The simcall actually invokes the following calls: simcall_vm_set_affinity(vm, src_pm, 0); simcall_vm_migrate(vm, dst_pm); simcall_vm_resume(vm);.
It is called at the end of the migration_rx_fun function from msg/msg_vm.c
vm | VM to migrate |
src_pm | Source physical host |
dst_pmt | Destination physical host |
Function to get the physical host of the given SIMIX VM host.
host | the vm host to get_phys_host (a sg_host_t) |
Function to set the CPU bound of the given SIMIX VM host.
host | the vm host (a sg_host_t) |
bound | bound (a double) |
Function to set the CPU affinity of the given SIMIX VM host.
host | the vm host (a sg_host_t) |
host | the pm host (a sg_host_t) |
mask | affinity mask (a unsigned long) |
void SIMIX_vm_suspend | ( | sg_host_t | ind_vm, |
smx_process_t | issuer | ||
) |
Function to suspend a SIMIX VM host.
This function stops the execution of the VM. All the processes on this VM will pause. The state of the VM is preserved on memory. We can later resume it again.
host | the vm host to suspend (a sg_host_t) |
void simcall_HANDLER_vm_suspend | ( | smx_simcall_t | simcall, |
sg_host_t | ind_vm | ||
) |
void SIMIX_vm_resume | ( | sg_host_t | ind_vm, |
smx_process_t | issuer | ||
) |
Function to resume a SIMIX VM host.
This function restart the execution of the VM. All the processes on this VM will run again.
host | the vm host to resume (a sg_host_t) |
void simcall_HANDLER_vm_resume | ( | smx_simcall_t | simcall, |
sg_host_t | ind_vm | ||
) |
void SIMIX_vm_save | ( | sg_host_t | ind_vm, |
smx_process_t | issuer | ||
) |
Function to save a SIMIX VM host.
This function is the same as vm_suspend, but the state of the VM is saved to the disk, and not preserved on memory. We can later restore it again.
host | the vm host to save (a sg_host_t) |
void simcall_HANDLER_vm_save | ( | smx_simcall_t | simcall, |
sg_host_t | ind_vm | ||
) |
void SIMIX_vm_restore | ( | sg_host_t | ind_vm, |
smx_process_t | issuer | ||
) |
Function to restore a SIMIX VM host.
This function restart the execution of the VM. All the processes on this VM will run again.
host | the vm host to restore (a sg_host_t) |
void simcall_HANDLER_vm_restore | ( | smx_simcall_t | simcall, |
sg_host_t | ind_vm | ||
) |
void SIMIX_vm_shutdown | ( | sg_host_t | ind_vm, |
smx_process_t | issuer | ||
) |
Function to shutdown a SIMIX VM host.
This function powers off the VM. All the processes on this VM will be killed. But, the state of the VM is preserved on memory. We can later start it again.
host | the vm host to shutdown (a sg_host_t) |
void simcall_HANDLER_vm_shutdown | ( | smx_simcall_t | simcall, |
sg_host_t | ind_vm | ||
) |