Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Multiplied network latencies by two when computing bandwidths using
authorcasanova <casanova@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Mar 2006 00:50:46 +0000 (00:50 +0000)
committercasanova <casanova@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 14 Mar 2006 00:50:46 +0000 (00:50 +0000)
the TCP bandwidth-sharing model as this model in fact requires RRT
and not latency.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1940 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/network.c

index 202c2c6..5e1be16 100644 (file)
@@ -374,10 +374,10 @@ static void update_resource_state(void *id,
       action->lat_current += delta;
       if(action->rate<0)
        lmm_update_variable_bound(maxmin_system, action->variable,
-                                 SG_TCP_CTE_GAMMA / action->lat_current);
+                                 SG_TCP_CTE_GAMMA / (2.0 * action->lat_current));
       else 
        lmm_update_variable_bound(maxmin_system, action->variable,
-                                 min(action->rate,SG_TCP_CTE_GAMMA / action->lat_current));
+                                 min(action->rate,SG_TCP_CTE_GAMMA / (2.0 * action->lat_current)));
     }
   } else if (event_type == nw_link->state_event) {
     if (value > 0)
@@ -436,13 +436,13 @@ static surf_action_t communicate(void *src, void *dst, double size, double rate)
   if(action->rate<0) {
     if(action->lat_current>0)
       lmm_update_variable_bound(maxmin_system, action->variable,
-                               SG_TCP_CTE_GAMMA / action->lat_current);
+                               SG_TCP_CTE_GAMMA / (2.0 * action->lat_current));
     else
       lmm_update_variable_bound(maxmin_system, action->variable, -1.0);
   } else {
     if(action->lat_current>0)
       lmm_update_variable_bound(maxmin_system, action->variable,
-                               min(action->rate,SG_TCP_CTE_GAMMA / action->lat_current));
+                               min(action->rate,SG_TCP_CTE_GAMMA / (2.0 * action->lat_current)));
     else
       lmm_update_variable_bound(maxmin_system, action->variable, action->rate);
   }