Changeset 26479 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 13, 2010 12:36:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
r26338 r26479 202 202 } 203 203 204 static bool pdmacFileAioMgrNormalIsBalancePossible(PPDMACEPFILEMGR pAioMgr) 205 { 206 /* Balancing doesn't make sense with only one endpoint. */ 207 if (pAioMgr->cEndpoints == 1) 208 return false; 209 210 /* Doesn't make sens to move endpoints if only one produces the whole load */ 211 unsigned cEndpointsWithLoad = 0; 212 213 PPDMASYNCCOMPLETIONENDPOINTFILE pCurr = pAioMgr->pEndpointsHead; 214 215 while (pCurr) 216 { 217 if (pCurr->AioMgr.cReqsPerSec) 218 cEndpointsWithLoad++; 219 220 pCurr = pCurr->AioMgr.pEndpointNext; 221 } 222 223 return (cEndpointsWithLoad > 1); 224 } 225 204 226 /** 205 227 * Creates a new I/O manager and spreads the I/O load of the endpoints … … 214 236 int rc = VINF_SUCCESS; 215 237 216 /* Splitting can't be done with only one open endpoint. */ 217 if (pAioMgr->cEndpoints > 1) 238 /* 239 * Check if balancing would improve the situation. 240 */ 241 if (pdmacFileAioMgrNormalIsBalancePossible(pAioMgr)) 218 242 { 219 243 rc = pdmacFileAioMgrCreate((PPDMASYNCCOMPLETIONEPCLASSFILE)pAioMgr->pEndpointsHead->Core.pEpClass, … … 274 298 } 275 299 } 300 else 301 Log(("AIOMgr: Load balancing would not improve anything\n")); 276 302 } 277 303
Note:
See TracChangeset
for help on using the changeset viewer.