Commit 98d6cb58 authored by Jonathon Duerig's avatar Jonathon Duerig

Fixed a bug in how bufferFull was calculated (it was erroneously true most of...

Fixed a bug in how bufferFull was calculated (it was erroneously true most of the time). Changed LeastSquares to require both a buffer full and increasing delays to consider a measurement authoritative.
parent 9d28e7a7
......@@ -211,6 +211,7 @@ int KernelTcp::writeMessage(int size, WriteResult & result)
*/
int bytesToWrite;
int bytesWritten = 0;
result.bufferFull = false;
for (bytesToWrite = size; bytesToWrite > 0; bytesToWrite -= MAX_WRITESIZE) {
int writeSize = min(MAX_WRITESIZE,bytesToWrite);
// Actually write the darn thing.
......
......@@ -140,7 +140,7 @@ void LeastSquaresThroughput::localAck(PacketInfo * packet)
// Make sure that the slope isn't being confused by banding at
// the millisecond level.
if (slope < -0.1)
if (slope < -0.1 && packet->bufferFull)
{
// The closest linear approximation indicates that buffers are
// being filled up, which means that the link was saturated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment