Lines Matching refs:AioMgr
112 pEpCurr = pEpPrev->AioMgr.pEndpointNext;
117 pEpNextToSort = pEpCurr->AioMgr.pEndpointNext;
120 PPDMASYNCCOMPLETIONENDPOINTFILE pPrev = pEpCurr->AioMgr.pEndpointPrev;
121 PPDMASYNCCOMPLETIONENDPOINTFILE pNext = pEpCurr->AioMgr.pEndpointNext;
124 pPrev->AioMgr.pEndpointNext = pNext;
129 pNext->AioMgr.pEndpointPrev = pPrev;
132 while (pEpPrev && (pEpPrev->AioMgr.cReqsPerSec < pEpCurr->AioMgr.cReqsPerSec))
133 pEpPrev = pEpPrev->AioMgr.pEndpointPrev;
137 pNext = pEpPrev->AioMgr.pEndpointNext;
141 pEpCurr->AioMgr.pEndpointNext = pNext;
142 pEpCurr->AioMgr.pEndpointPrev = pEpPrev;
145 pNext->AioMgr.pEndpointPrev = pEpCurr;
148 pEpPrev->AioMgr.pEndpointNext = pEpCurr;
161 AssertMsg(!pEpCurr->AioMgr.pEndpointPrev, ("First element in the list points to previous element\n"));
167 PPDMASYNCCOMPLETIONENDPOINTFILE pNext = pEpCurr->AioMgr.pEndpointNext;
168 PPDMASYNCCOMPLETIONENDPOINTFILE pPrev = pEpCurr->AioMgr.pEndpointPrev;
170 Assert(!pNext || pNext->AioMgr.cReqsPerSec <= pEpCurr->AioMgr.cReqsPerSec);
171 Assert(!pPrev || pPrev->AioMgr.cReqsPerSec >= pEpCurr->AioMgr.cReqsPerSec);
191 PPDMASYNCCOMPLETIONENDPOINTFILE pPrev = pEndpointRemove->AioMgr.pEndpointPrev;
192 PPDMASYNCCOMPLETIONENDPOINTFILE pNext = pEndpointRemove->AioMgr.pEndpointNext;
198 pPrev->AioMgr.pEndpointNext = pNext;
203 pNext->AioMgr.pEndpointPrev = pPrev;
206 if (!pEndpointRemove->AioMgr.cRequestsActive)
235 if (pCurr->AioMgr.cReqsPerSec)
238 pCurr = pCurr->AioMgr.pEndpointNext;
268 unsigned cReqsHere = pAioMgr->pEndpointsHead->AioMgr.cReqsPerSec;
270 PPDMASYNCCOMPLETIONENDPOINTFILE pCurr = pAioMgr->pEndpointsHead->AioMgr.pEndpointNext;
280 Log(("Keeping endpoint %#p{%s} with %u reqs/s\n", pCurr->Core.pszUri, pCurr->AioMgr.cReqsPerSec));
281 cReqsHere += pCurr->AioMgr.cReqsPerSec;
282 pCurr = pCurr->AioMgr.pEndpointNext;
287 Log(("Moving endpoint %#p{%s} with %u reqs/s to other manager\n", pCurr, pCurr->Core.pszUri, pCurr->AioMgr.cReqsPerSec));
288 cReqsOther += pCurr->AioMgr.cReqsPerSec;
292 pCurr = pCurr->AioMgr.pEndpointNext;
299 pMove->AioMgr.fMoving = true;
300 pMove->AioMgr.pAioMgrDst = pAioMgrNew;
304 pMove->AioMgr.fMoving = false;
305 pMove->AioMgr.pAioMgrDst = NULL;
349 pCurr = pCurr->AioMgr.pEndpointNext;
397 pCurr = pCurr->AioMgr.pEndpointNext;
460 if (!pEndpoint->AioMgr.pReqsPendingHead)
462 Assert(!pEndpoint->AioMgr.pReqsPendingTail);
463 pEndpoint->AioMgr.pReqsPendingHead = pTaskHead;
467 Assert(pEndpoint->AioMgr.pReqsPendingTail);
468 pEndpoint->AioMgr.pReqsPendingTail->pNext = pTaskHead;
475 pEndpoint->AioMgr.pReqsPendingTail = pTaskHead;
485 if (!pEndpoint->AioMgr.pReqsPendingHead)
487 Assert(!pEndpoint->AioMgr.pReqsPendingTail);
488 pEndpoint->AioMgr.pReqsPendingHead = pTask;
492 Assert(pEndpoint->AioMgr.pReqsPendingTail);
493 pEndpoint->AioMgr.pReqsPendingTail->pNext = pTask;
496 pEndpoint->AioMgr.pReqsPendingTail = pTask;
550 pEndpoint->AioMgr.cRequestsActive += cReqs;
553 LogFlow(("Endpoint has a total of %d active requests now\n", pEndpoint->AioMgr.cRequestsActive));
574 pEndpoint->AioMgr.cRequestsActive--;
596 LogFlow(("Endpoint has a total of %u active requests now\n", pEndpoint->AioMgr.cRequestsActive));
650 if (!pEndpoint->AioMgr.cLockedReqsActive && fAlignedReq)
654 pRangeLock = (PPDMACFILERANGELOCK)RTAvlrFileOffsetRangeGet(pEndpoint->AioMgr.pTreeRangesLocked, offStart);
657 pRangeLock = (PPDMACFILERANGELOCK)RTAvlrFileOffsetGetBestFit(pEndpoint->AioMgr.pTreeRangesLocked, offStart, true);
707 if (!pEndpoint->AioMgr.cLockedReqsActive && fAlignedReq)
725 bool fInserted = RTAvlrFileOffsetInsert(pEndpoint->AioMgr.pTreeRangesLocked, &pRangeLock->Core);
730 pEndpoint->AioMgr.cLockedReqsActive++;
750 RTAvlrFileOffsetRemove(pEndpoint->AioMgr.pTreeRangesLocked, pRangeLock->Core.Key);
755 pEndpoint->AioMgr.cLockedReqsActive--;
1028 pEndpoint->AioMgr.cReqsProcessed++;
1033 if ( !pEndpoint->AioMgr.cRequestsActive
1148 if (pEndpoint->AioMgr.pReqsPendingHead)
1152 pTasksHead = pEndpoint->AioMgr.pReqsPendingHead;
1157 pEndpoint->AioMgr.pReqsPendingHead = NULL;
1158 pEndpoint->AioMgr.pReqsPendingTail = NULL;
1163 if (!pEndpoint->pFlushReq && !pEndpoint->AioMgr.pReqsPendingHead)
1195 pEndpointNew->AioMgr.pEndpointNext = pAioMgr->pEndpointsHead;
1196 pEndpointNew->AioMgr.pEndpointPrev = NULL;
1198 pAioMgr->pEndpointsHead->AioMgr.pEndpointPrev = pEndpointNew;
1233 && (!pEndpointClose->AioMgr.cRequestsActive))
1292 && !pEndpoint->AioMgr.fMoving)
1298 else if ( !pEndpoint->AioMgr.cRequestsActive
1306 if (pEndpoint->AioMgr.fMoving)
1308 pEndpoint->AioMgr.fMoving = false;
1309 pdmacFileAioMgrAddEndpoint(pEndpoint->AioMgr.pAioMgrDst, pEndpoint);
1323 pEndpoint = pEndpoint->AioMgr.pEndpointNext;
1355 pEndpoint->AioMgr.cRequestsActive--;
1356 pEndpoint->AioMgr.cReqsProcessed++;
1400 pTask->pNext = pEndpoint->AioMgr.pReqsPendingHead;
1401 pEndpoint->AioMgr.pReqsPendingHead = pTask;
1404 if (!pEndpoint->AioMgr.fMoving)
1411 pEndpoint->AioMgr.fMoving = true;
1417 pEndpoint->AioMgr.pAioMgrDst = pAioMgrFailsafe;
1424 if (!pEndpoint->AioMgr.cRequestsActive)
1429 rc = pdmacFileAioMgrAddEndpoint(pEndpoint->AioMgr.pAioMgrDst, pEndpoint);
1569 if (!pEndpoint->AioMgr.cRequestsActive && pEndpoint->pFlushReq)
1580 else if (RT_UNLIKELY(!pEndpoint->AioMgr.cRequestsActive && pEndpoint->AioMgr.fMoving))
1586 rc = pdmacFileAioMgrAddEndpoint(pEndpoint->AioMgr.pAioMgrDst, pEndpoint);
1689 pEndpointCurr->AioMgr.cReqsPerSec = pEndpointCurr->AioMgr.cReqsProcessed / (uMillisCurr + PDMACEPFILEMGR_LOAD_UPDATE_PERIOD);
1690 pEndpointCurr->AioMgr.cReqsProcessed = 0;
1691 pEndpointCurr = pEndpointCurr->AioMgr.pEndpointNext;