X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e68ca10e951fb61e944c99c7774b1e415ae9f6d..f431ee913249e0d6d028d2bfc1db185efa003bc4:/include/simgrid/platf.h diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h index 677ea14d1d..723c659185 100644 --- a/include/simgrid/platf.h +++ b/include/simgrid/platf.h @@ -41,6 +41,42 @@ typedef enum { } e_surf_process_on_failure_t; +/* FIXME: Where should the VM state be defined? */ +typedef enum { + /* created, but not yet started */ + SURF_VM_STATE_CREATED, + + SURF_VM_STATE_RUNNING, + SURF_VM_STATE_MIGRATING, + + /* Suspend/resume does not involve disk I/O, so we assume there is no transition states. */ + SURF_VM_STATE_SUSPENDED, + + /* Save/restore involves disk I/O, so there should be transition states. */ + SURF_VM_STATE_SAVING, + SURF_VM_STATE_SAVED, + SURF_VM_STATE_RESTORING, + +} e_surf_vm_state_t; + +typedef struct ws_params { + int ncpus; + long ramsize; + int overcommit; + + /* The size of other states than memory pages, which is out-of-scope of dirty + * page tracking. */ + long devsize; + int skip_stage2; + double max_downtime; + + double dp_rate; + double dp_cap; + + /* set migration speed */ + double mig_speed; +} s_ws_params_t, *ws_params_t; + typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */ /** opaque structure defining a event generator for availability based on a probability distribution */ @@ -70,6 +106,11 @@ XBT_PUBLIC(probabilist_event_generator_t) tmgr_event_generator_new_exponential(c XBT_PUBLIC(probabilist_event_generator_t) tmgr_event_generator_new_weibull(const char* id, double scale, double shape); +typedef xbt_dictelm_t sg_host_t; +static inline char* sg_host_name(sg_host_t host) { + return host->key; +} + /* * Platform creation functions. Instead of passing 123 arguments to the creation functions @@ -182,6 +223,9 @@ typedef struct s_sg_platf_cluster_cbarg { double lat; double bb_bw; double bb_lat; + double loopback_bw; + double loopback_lat; + double limiter_link; const char* router_id; e_surf_link_sharing_policy_t sharing_policy; e_surf_link_sharing_policy_t bb_sharing_policy;