From 2d8ec4ac68dc5d9c195625940a22a4842997fbb9 Mon Sep 17 00:00:00 2001 From: casanova Date: Tue, 14 Mar 2006 00:50:46 +0000 Subject: [PATCH] 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 --- src/surf/network.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } -- 2.20.1