Create separate high/low water level limits for GetMesh and

Wed, 07 Aug 2013 21:31:41 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Wed, 07 Aug 2013 21:31:41 -0400
changeset 40705
4daab1adb0c3
parent 40704
1d61fa020f51
child 40706
fc62f596cc97
child 40709
f38b9792a8f3

Create separate high/low water level limits for GetMesh and
GetMesh2 capabilities. They should be independent now.

indra/newview/llmeshrepository.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llmeshrepository.cpp	Tue Aug 06 18:05:34 2013 -0400
     1.2 +++ b/indra/newview/llmeshrepository.cpp	Wed Aug 07 21:31:41 2013 -0400
     1.3 @@ -235,9 +235,13 @@
     1.4  
     1.5  const S32 MESH_HEADER_SIZE = 4096;                      // Important:  assumption is that headers fit in this space
     1.6  const S32 REQUEST_HIGH_WATER_MIN = 32;
     1.7 -const S32 REQUEST_HIGH_WATER_MAX = 80;
     1.8 +const S32 REQUEST_HIGH_WATER_MAX = 200;
     1.9  const S32 REQUEST_LOW_WATER_MIN = 16;
    1.10 -const S32 REQUEST_LOW_WATER_MAX = 40;
    1.11 +const S32 REQUEST_LOW_WATER_MAX = 100;
    1.12 +const S32 REQUEST2_HIGH_WATER_MIN = 32;
    1.13 +const S32 REQUEST2_HIGH_WATER_MAX = 80;
    1.14 +const S32 REQUEST2_LOW_WATER_MIN = 16;
    1.15 +const S32 REQUEST2_LOW_WATER_MAX = 40;
    1.16  const U32 LARGE_MESH_FETCH_THRESHOLD = 1U << 21;		// Size at which requests goes to narrow/slow queue
    1.17  const long SMALL_MESH_XFER_TIMEOUT = 60L;				// Seconds to complete xfer, small mesh downloads
    1.18  const long LARGE_MESH_XFER_TIMEOUT = 600L;				// Seconds to complete xfer, large downloads
    1.19 @@ -376,8 +380,8 @@
    1.20  volatile S32 LLMeshRepoThread::sActiveHeaderRequests = 0;
    1.21  volatile S32 LLMeshRepoThread::sActiveLODRequests = 0;
    1.22  U32	LLMeshRepoThread::sMaxConcurrentRequests = 1;
    1.23 -S32 LLMeshRepoThread::sRequestLowWater = REQUEST_LOW_WATER_MIN;
    1.24 -S32 LLMeshRepoThread::sRequestHighWater = REQUEST_HIGH_WATER_MIN;
    1.25 +S32 LLMeshRepoThread::sRequestLowWater = REQUEST2_LOW_WATER_MIN;
    1.26 +S32 LLMeshRepoThread::sRequestHighWater = REQUEST2_HIGH_WATER_MIN;
    1.27  S32 LLMeshRepoThread::sRequestWaterLevel = 0;
    1.28  
    1.29  // Base handler class for all mesh users of llcorehttp.
    1.30 @@ -2985,18 +2989,21 @@
    1.31  		LLMeshRepoThread::sRequestHighWater = llclamp(2 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
    1.32  													  REQUEST_HIGH_WATER_MIN,
    1.33  													  REQUEST_HIGH_WATER_MAX);
    1.34 +		LLMeshRepoThread::sRequestLowWater = llclamp(LLMeshRepoThread::sRequestHighWater / 2,
    1.35 +													 REQUEST_LOW_WATER_MIN,
    1.36 +													 REQUEST_LOW_WATER_MAX);
    1.37  	}
    1.38  	else
    1.39  	{
    1.40  		// GetMesh2 operation with keepalives, etc.
    1.41  		LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
    1.42  		LLMeshRepoThread::sRequestHighWater = llclamp(5 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
    1.43 -													  REQUEST_HIGH_WATER_MIN,
    1.44 -													  REQUEST_HIGH_WATER_MAX);
    1.45 +													  REQUEST2_HIGH_WATER_MIN,
    1.46 +													  REQUEST2_HIGH_WATER_MAX);
    1.47 +		LLMeshRepoThread::sRequestLowWater = llclamp(LLMeshRepoThread::sRequestHighWater / 2,
    1.48 +													 REQUEST2_LOW_WATER_MIN,
    1.49 +													 REQUEST2_LOW_WATER_MAX);
    1.50  	}
    1.51 -	LLMeshRepoThread::sRequestLowWater = llclamp(LLMeshRepoThread::sRequestHighWater / 2,
    1.52 -												 REQUEST_LOW_WATER_MIN,
    1.53 -												 REQUEST_LOW_WATER_MAX);
    1.54  	
    1.55  	//clean up completed upload threads
    1.56  	for (std::vector<LLMeshUploadThread*>::iterator iter = mUploads.begin(); iter != mUploads.end(); )

mercurial