From: casanova Date: Tue, 14 Mar 2006 00:50:46 +0000 (+0000) Subject: Multiplied network latencies by two when computing bandwidths using X-Git-Tag: v3.3~3418 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2d8ec4ac68dc5d9c195625940a22a4842997fbb9 Multiplied network latencies by two when computing bandwidths using 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 --- diff --git a/src/surf/network.c b/src/surf/network.c index 202c2c613f..5e1be16467 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -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); }