From: Martin Quinson Date: Tue, 22 Nov 2016 14:43:06 +0000 (+0100) Subject: vm: kill some useless static functions X-Git-Tag: v3_14~145 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/411bdcf820a148926951d59809cd452e1c683eec vm: kill some useless static functions --- diff --git a/src/msg/msg_vm.cpp b/src/msg/msg_vm.cpp index acdfbcb347..b1db80623c 100644 --- a/src/msg/msg_vm.cpp +++ b/src/msg/msg_vm.cpp @@ -569,33 +569,6 @@ static sg_size_t get_updated_size(double computed, double dp_rate, double dp_cap return (sg_size_t) updated_size; } -static double send_stage1(struct migration_session* ms, sg_size_t ramsize, double mig_speed, double dp_rate, - double dp_cap) -{ - // const long chunksize = (sg_size_t)1024 * 1024 * 100; - const sg_size_t chunksize = (sg_size_t)1024 * 1024 * 100000; - sg_size_t remaining = ramsize; - double computed_total = 0; - - while (remaining > 0) { - sg_size_t datasize = chunksize; - if (remaining < chunksize) - datasize = remaining; - - remaining -= datasize; - send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, datasize, ms->mbox, 1, 0, mig_speed, -1); - double computed = lookup_computed_flop_counts(ms->vm, 1, 0); - computed_total += computed; - } - - return computed_total; -} - -static double get_threshold_value(double bandwidth, double max_downtime) -{ - return max_downtime * bandwidth; -} - static int migration_tx_fun(int argc, char *argv[]) { XBT_DEBUG("mig: tx_start"); @@ -670,7 +643,7 @@ static int migration_tx_fun(int argc, char *argv[]) /* estimate bandwidth */ double bandwidth = ramsize / (clock_post_send - clock_prev_send); - threshold = get_threshold_value(bandwidth, max_downtime); + threshold = bandwidth * max_downtime; XBT_DEBUG("actual bandwidth %f (MB/s), threshold %f", bandwidth / 1024 / 1024, threshold); } @@ -718,7 +691,7 @@ static int migration_tx_fun(int argc, char *argv[]) if (sent == updated_size) { /* timeout did not happen */ double bandwidth = updated_size / (clock_post_send - clock_prev_send); - threshold = get_threshold_value(bandwidth, max_downtime); + threshold = bandwidth * max_downtime; XBT_DEBUG("actual bandwidth %f, threshold %f", bandwidth / 1024 / 1024, threshold); remaining_size -= sent; stage2_round += 1; diff --git a/src/simix/smx_vm.cpp b/src/simix/smx_vm.cpp index 0e85880b79..10def72ddd 100644 --- a/src/simix/smx_vm.cpp +++ b/src/simix/smx_vm.cpp @@ -12,17 +12,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX Virtual Machines"); -static long host_get_ramsize(sg_host_t vm, int *overcommit) -{ - s_vm_params_t params; - static_cast(vm)->parameters(¶ms); - - if (overcommit) - *overcommit = params.overcommit; - - return params.ramsize; -} - /** * @brief 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