-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;
-}
-