SimGrid  3.14.159
Versatile Simulation of Distributed Systems
msg_vm.cpp File Reference
#include <xbt/ex.hpp>
#include "src/instr/instr_private.h"
#include "src/msg/msg_private.h"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
#include "simgrid/host.h"
#include "simgrid/simix.hpp"

Classes

struct  dirty_page
 
struct  migration_session
 

Typedefs

typedef struct dirty_page s_dirty_page
 
typedef struct dirty_pagedirty_page_t
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (msg_vm, msg, "Cloud-oriented parts of the MSG API")
 
void MSG_vm_set_params (msg_vm_t vm, vm_params_t params)
 Set the parameters of a given host. More...
 
void MSG_vm_get_params (msg_vm_t vm, vm_params_t params)
 Get the parameters of a given host. More...
 
static int __MSG_vm_is_state (msg_vm_t vm, e_surf_vm_state_t state)
 
int MSG_vm_is_created (msg_vm_t vm)
 Opaque type describing a Virtual Machine. More...
 
int MSG_vm_is_running (msg_vm_t vm)
 Returns whether the given VM is currently running. More...
 
int MSG_vm_is_migrating (msg_vm_t vm)
 Returns whether the given VM is currently migrating. More...
 
int MSG_vm_is_suspended (msg_vm_t vm)
 Returns whether the given VM is currently suspended, not running. More...
 
msg_vm_t MSG_vm_create (msg_host_t pm, const char *name, int ramsize, int mig_netspeed, int dp_intensity)
 Create a new VM with specified parameters. More...
 
msg_vm_t MSG_vm_create_core (msg_host_t pm, const char *name)
 Create a new VM object. More...
 
void MSG_vm_destroy (msg_vm_t vm)
 Destroy a VM. More...
 
void MSG_vm_start (msg_vm_t vm)
 Start a vm (i.e., boot the guest operating system)If the VM cannot be started (because of memory overprovisionning), an exception is generated. More...
 
void MSG_vm_shutdown (msg_vm_t vm)
 Immediately kills all processes within the given VM. More...
 
static char * get_mig_process_tx_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 
static char * get_mig_process_rx_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 
static char * get_mig_task_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, int stage)
 
static int migration_rx_fun (int argc, char *argv[])
 
static void start_dirty_page_tracking (msg_vm_t vm)
 
static void stop_dirty_page_tracking (msg_vm_t vm)
 
static double get_computed (char *key, msg_vm_t vm, dirty_page_t dp, double remaining, double clock)
 
static double lookup_computed_flop_counts (msg_vm_t vm, int stage_for_fancy_debug, int stage2_round_for_fancy_debug)
 
void MSG_host_add_task (msg_host_t host, msg_task_t task)
 take care of the dirty page tracking, in case we're adding a task to a migrating VM More...
 
void MSG_host_del_task (msg_host_t host, msg_task_t task)
 
static sg_size_t send_migration_data (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, sg_size_t size, char *mbox, int stage, int stage2_round, double mig_speed, double timeout)
 
static sg_size_t get_updated_size (double computed, double dp_rate, double dp_cap)
 
static int migration_tx_fun (int argc, char *argv[])
 
void MSG_vm_migrate (msg_vm_t vm, msg_host_t dst_pm)
 Migrate the VM to the given host. More...
 
void MSG_vm_suspend (msg_vm_t vm)
 Immediately suspend the execution of all processes within the given VM. More...
 
void MSG_vm_resume (msg_vm_t vm)
 Resume the execution of the VM. More...
 
msg_host_t MSG_vm_get_pm (msg_vm_t vm)
 Get the physical host of a given VM. More...
 
void MSG_vm_set_bound (msg_vm_t vm, double bound)
 Set a CPU bound for a given VM. More...
 

Typedef Documentation

◆ s_dirty_page

typedef struct dirty_page s_dirty_page

◆ dirty_page_t

typedef struct dirty_page* dirty_page_t

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( msg_vm  ,
msg  ,
"Cloud-oriented parts of the MSG API"   
)

◆ MSG_vm_set_params()

void MSG_vm_set_params ( msg_vm_t  vm,
vm_params_t  params 
)

Set the parameters of a given host.

Parameters
vma vm
paramsa parameter object

◆ MSG_vm_get_params()

void MSG_vm_get_params ( msg_vm_t  vm,
vm_params_t  params 
)

Get the parameters of a given host.

Parameters
vmthe vm you are interested into
paramsa prameter object

◆ __MSG_vm_is_state()

static int __MSG_vm_is_state ( msg_vm_t  vm,
e_surf_vm_state_t  state 
)
inlinestatic

◆ get_mig_process_tx_name()

static char* get_mig_process_tx_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm 
)
inlinestatic

◆ get_mig_process_rx_name()

static char* get_mig_process_rx_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm 
)
inlinestatic

◆ get_mig_task_name()

static char* get_mig_task_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm,
int  stage 
)
inlinestatic

◆ migration_rx_fun()

static int migration_rx_fun ( int  argc,
char *  argv[] 
)
static

◆ start_dirty_page_tracking()

static void start_dirty_page_tracking ( msg_vm_t  vm)
static

◆ stop_dirty_page_tracking()

static void stop_dirty_page_tracking ( msg_vm_t  vm)
static

◆ get_computed()

static double get_computed ( char *  key,
msg_vm_t  vm,
dirty_page_t  dp,
double  remaining,
double  clock 
)
static

◆ lookup_computed_flop_counts()

static double lookup_computed_flop_counts ( msg_vm_t  vm,
int  stage_for_fancy_debug,
int  stage2_round_for_fancy_debug 
)
static

◆ MSG_host_add_task()

void MSG_host_add_task ( msg_host_t  host,
msg_task_t  task 
)

take care of the dirty page tracking, in case we're adding a task to a migrating VM

◆ MSG_host_del_task()

void MSG_host_del_task ( msg_host_t  host,
msg_task_t  task 
)

◆ send_migration_data()

static sg_size_t send_migration_data ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm,
sg_size_t  size,
char *  mbox,
int  stage,
int  stage2_round,
double  mig_speed,
double  timeout 
)
static

◆ get_updated_size()

static sg_size_t get_updated_size ( double  computed,
double  dp_rate,
double  dp_cap 
)
static

◆ migration_tx_fun()

static int migration_tx_fun ( int  argc,
char *  argv[] 
)
static