Skip to content

Commit b53f2e2

Browse files
committedJun 24, 2017
gp4par: Changed congestion metrics for better avoidance of congestion
1 parent 63f1d1f commit b53f2e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎src/gp4par/Greenpak4PAREngine.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ uint32_t Greenpak4PAREngine::ComputeCongestionCost() const
200200

201201
//Squaring each half makes minimizing the larger one more important
202202
//vs if we just summed. Also add in a fixed penalty if we are using >100% resources
203-
uint32_t cost = sqrt(costs[0]*costs[0] + costs[1]*costs[1]);
203+
uint32_t cost = costs[0]*costs[0] + costs[1]*costs[1];
204204
if( (costs[0] > 10) || (costs[1] > 10) )
205205
cost += 20;
206206
return cost;

0 commit comments

Comments
 (0)
Please sign in to comment.