|
@@ -365,7 +365,7 @@ double sc_hypervisor_get_slowest_ctx_exec_time(void)
|
|
|
|
|
|
|
|
|
|
struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
|
|
struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
|
|
- double elapsed_time = (config->ispeed_ctx_sample/1000000000.0)/sc_hypervisor_get_ctx_velocity(sc_w);
|
|
+ double elapsed_time = (config->ispeed_ctx_sample/1000000000.0)/sc_hypervisor_get_ctx_speed(sc_w);
|
|
if(elapsed_time > slowest_time)
|
|
if(elapsed_time > slowest_time)
|
|
slowest_time = elapsed_time;
|
|
slowest_time = elapsed_time;
|
|
|
|
|
|
@@ -388,7 +388,7 @@ double sc_hypervisor_get_fastest_ctx_exec_time(void)
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
|
|
|
|
|
|
struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
|
|
struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
|
|
- double elapsed_time = (config->ispeed_ctx_sample/1000000000.0)/sc_hypervisor_get_ctx_velocity(sc_w);
|
|
+ double elapsed_time = (config->ispeed_ctx_sample/1000000000.0)/sc_hypervisor_get_ctx_speed(sc_w);
|
|
|
|
|
|
if(elapsed_time < fastest_time)
|
|
if(elapsed_time < fastest_time)
|
|
fastest_time = elapsed_time;
|
|
fastest_time = elapsed_time;
|
|
@@ -446,8 +446,8 @@ void sc_hypervisor_get_tasks_times(int nw, int nt, double times[nw][nt], int *wo
|
|
{
|
|
{
|
|
if(arch == STARPU_CUDA_WORKER)
|
|
if(arch == STARPU_CUDA_WORKER)
|
|
{
|
|
{
|
|
- double transfer_velocity = starpu_get_bandwidth_RAM_CUDA(worker);
|
|
+ double transfer_speed = starpu_get_bandwidth_RAM_CUDA(worker);
|
|
- transfer_time += (tp->data_size / transfer_velocity) / 1000. ;
|
|
+ transfer_time += (tp->data_size / transfer_speed) / 1000. ;
|
|
double latency = starpu_get_latency_RAM_CUDA(worker);
|
|
double latency = starpu_get_latency_RAM_CUDA(worker);
|
|
transfer_time += latency/1000.;
|
|
transfer_time += latency/1000.;
|
|
|
|
|
|
@@ -457,8 +457,8 @@ void sc_hypervisor_get_tasks_times(int nw, int nt, double times[nw][nt], int *wo
|
|
{
|
|
{
|
|
if(!starpu_sched_ctx_contains_type_of_worker(arch, tp->sched_ctx_id))
|
|
if(!starpu_sched_ctx_contains_type_of_worker(arch, tp->sched_ctx_id))
|
|
{
|
|
{
|
|
- double transfer_velocity = starpu_get_bandwidth_CUDA_RAM(worker);
|
|
+ double transfer_speed = starpu_get_bandwidth_CUDA_RAM(worker);
|
|
- transfer_time += (tp->data_size / transfer_velocity) / 1000. ;
|
|
+ transfer_time += (tp->data_size / transfer_speed) / 1000. ;
|
|
double latency = starpu_get_latency_CUDA_RAM(worker);
|
|
double latency = starpu_get_latency_CUDA_RAM(worker);
|
|
transfer_time += latency / 1000.;
|
|
transfer_time += latency / 1000.;
|
|
}
|
|
}
|
|
@@ -489,8 +489,8 @@ unsigned sc_hypervisor_check_idle(unsigned sched_ctx, int worker)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
-unsigned sc_hypervisor_check_velocity_gap_btw_ctxs(void)
|
|
+unsigned sc_hypervisor_check_speed_gap_btw_ctxs(void)
|
|
{
|
|
{
|
|
int *sched_ctxs = sc_hypervisor_get_sched_ctxs();
|
|
int *sched_ctxs = sc_hypervisor_get_sched_ctxs();
|
|
int nsched_ctxs = sc_hypervisor_get_nsched_ctxs();
|
|
int nsched_ctxs = sc_hypervisor_get_nsched_ctxs();
|
|
@@ -537,8 +537,8 @@ unsigned sc_hypervisor_check_velocity_gap_btw_ctxs(void)
|
|
{
|
|
{
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
double v[nw];
|
|
double v[nw];
|
|
- v[0] = sc_hypervisor_get_velocity(sc_w, STARPU_CUDA_WORKER);
|
|
+ v[0] = sc_hypervisor_get_speed(sc_w, STARPU_CUDA_WORKER);
|
|
- v[1] = sc_hypervisor_get_velocity(sc_w, STARPU_CPU_WORKER);
|
|
+ v[1] = sc_hypervisor_get_speed(sc_w, STARPU_CPU_WORKER);
|
|
|
|
|
|
optimal_v[i] = nworkers_per_type[i][0] * v[0] + nworkers_per_type[i][1]* v[1];
|
|
optimal_v[i] = nworkers_per_type[i][0] * v[0] + nworkers_per_type[i][1]* v[1];
|
|
_set_optimal_v(i, optimal_v[i]);
|
|
_set_optimal_v(i, optimal_v[i]);
|
|
@@ -555,7 +555,7 @@ unsigned sc_hypervisor_check_velocity_gap_btw_ctxs(void)
|
|
{
|
|
{
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
|
|
|
|
- double ctx_v = sc_hypervisor_get_ctx_velocity(sc_w);
|
|
+ double ctx_v = sc_hypervisor_get_ctx_speed(sc_w);
|
|
if(ctx_v == -1.0)
|
|
if(ctx_v == -1.0)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -564,19 +564,19 @@ unsigned sc_hypervisor_check_velocity_gap_btw_ctxs(void)
|
|
{
|
|
{
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
|
|
|
|
- double ctx_v = sc_hypervisor_get_ctx_velocity(sc_w);
|
|
+ double ctx_v = sc_hypervisor_get_ctx_speed(sc_w);
|
|
if(ctx_v != -1.0 && ((ctx_v < 0.8*optimal_v[i]) || ctx_v > 1.2*optimal_v[i]))
|
|
if(ctx_v != -1.0 && ((ctx_v < 0.8*optimal_v[i]) || ctx_v > 1.2*optimal_v[i]))
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- else
|
|
+ else
|
|
- SC_MAX_VELOCITY_GAP and compare the speed of the contexts, whenever the difference
|
|
+ SC_MAX_SPEED_GAP and compare the speed of the contexts, whenever the difference
|
|
btw them is greater than the max value the function returns true */
|
|
btw them is greater than the max value the function returns true */
|
|
{
|
|
{
|
|
for(i = 0; i < nsched_ctxs; i++)
|
|
for(i = 0; i < nsched_ctxs; i++)
|
|
{
|
|
{
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
|
|
- double ctx_v = sc_hypervisor_get_ctx_velocity(sc_w);
|
|
+ double ctx_v = sc_hypervisor_get_ctx_speed(sc_w);
|
|
if(ctx_v != -1.0)
|
|
if(ctx_v != -1.0)
|
|
{
|
|
{
|
|
for(j = 0; j < nsched_ctxs; j++)
|
|
for(j = 0; j < nsched_ctxs; j++)
|
|
@@ -588,11 +588,11 @@ unsigned sc_hypervisor_check_velocity_gap_btw_ctxs(void)
|
|
return 1;
|
|
return 1;
|
|
|
|
|
|
other_sc_w = sc_hypervisor_get_wrapper(sched_ctxs[j]);
|
|
other_sc_w = sc_hypervisor_get_wrapper(sched_ctxs[j]);
|
|
- double other_ctx_v = sc_hypervisor_get_ctx_velocity(other_sc_w);
|
|
+ double other_ctx_v = sc_hypervisor_get_ctx_speed(other_sc_w);
|
|
if(other_ctx_v != -1.0)
|
|
if(other_ctx_v != -1.0)
|
|
{
|
|
{
|
|
double gap = ctx_v < other_ctx_v ? other_ctx_v / ctx_v : ctx_v / other_ctx_v;
|
|
double gap = ctx_v < other_ctx_v ? other_ctx_v / ctx_v : ctx_v / other_ctx_v;
|
|
- double max_vel = _get_max_velocity_gap();
|
|
+ double max_vel = _get_max_speed_gap();
|
|
if(gap > max_vel)
|
|
if(gap > max_vel)
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -614,7 +614,7 @@ unsigned sc_hypervisor_criteria_fulfilled(unsigned sched_ctx, int worker)
|
|
if(criteria == SC_IDLE)
|
|
if(criteria == SC_IDLE)
|
|
return sc_hypervisor_check_idle(sched_ctx, worker);
|
|
return sc_hypervisor_check_idle(sched_ctx, worker);
|
|
else
|
|
else
|
|
- return sc_hypervisor_check_velocity_gap_btw_ctxs();
|
|
+ return sc_hypervisor_check_speed_gap_btw_ctxs();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
return 0;
|
|
return 0;
|