Index: /trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp
===================================================================
--- /trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp	(revision 26688)
+++ /trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp	(revision 26689)
@@ -464,31 +464,4 @@
 
 /**
- * I/O refresh timer callback.
- */
-static void pdmacFileBwRefresh(PVM pVM, PTMTIMER pTimer, void *pvUser)
-{
-    PPDMACFILEBWMGR pBwMgr = (PPDMACFILEBWMGR)pvUser;
-
-    LogFlowFunc(("pVM=%p pTimer=%p pvUser=%p\n", pVM, pTimer, pvUser));
-
-    /* Reset the counter growing the maximum if allowed and needed */
-    bool fIncreaseNeeded = ASMAtomicReadBool(&pBwMgr->fVMTransferLimitReached);
-
-    if (   fIncreaseNeeded
-        && pBwMgr->cbVMTransferPerSecStart < pBwMgr->cbVMTransferPerSecMax)
-    {
-       pBwMgr->cbVMTransferPerSecStart = RT_MIN(pBwMgr->cbVMTransferPerSecMax, pBwMgr->cbVMTransferPerSecStart + pBwMgr->cbVMTransferPerSecStep);
-       LogFlow(("AIOMgr: Increasing maximum bandwidth to %u bytes/sec\n", pBwMgr->cbVMTransferPerSecStart));
-    }
-
-    /* Update */
-    ASMAtomicWriteU32(&pBwMgr->cbVMTransferAllowed, pBwMgr->cbVMTransferPerSecStart);
-    ASMAtomicWriteBool(&pBwMgr->fVMTransferLimitReached, false);
-
-    /* Arm the timer */
-    TMTimerSetMillies(pTimer, 1000);
-}
-
-/**
  * Destroys a async I/O manager.
  *
@@ -549,16 +522,7 @@
 
         pBwMgr->cbVMTransferAllowed = pBwMgr->cbVMTransferPerSecStart;
-
-        /* Init the refresh timer */
-        rc = TMR3TimerCreateInternal(pEpClassFile->Core.pVM,
-                                     TMCLOCK_REAL,
-                                     pdmacFileBwRefresh,
-                                     pBwMgr,
-                                     "AsyncCompletionFile-BW-Refresh",
-                                     &pBwMgr->pBwRefreshTimer);
-        if (RT_SUCCESS(rc))
-            *ppBwMgr = pBwMgr;
-        else
-            MMR3HeapFree(pBwMgr);
+        pBwMgr->tsUpdatedLast       = RTTimeSystemNanoTS();
+
+        *ppBwMgr = pBwMgr;
     }
 
@@ -568,5 +532,4 @@
 static void pdmacFileBwMgrDestroy(PPDMACFILEBWMGR pBwMgr)
 {
-    TMR3TimerDestroy(pBwMgr->pBwRefreshTimer);
     MMR3HeapFree(pBwMgr);
 }
@@ -575,6 +538,4 @@
 {
     pBwMgr->cRefs++;
-    if (pBwMgr->cRefs == 1)
-        TMTimerSetMillies(pBwMgr->pBwRefreshTimer, 1000); /* 1sec update interval */
 }
 
@@ -583,6 +544,4 @@
     Assert(pBwMgr->cRefs > 0);
     pBwMgr->cRefs--;
-    if (!pBwMgr->cRefs)
-        TMTimerStop(pBwMgr->pBwRefreshTimer);
 }
 
@@ -598,7 +557,26 @@
     else
     {
-        /* We are out of ressources */
-        ASMAtomicAddU32(&pBwMgr->cbVMTransferAllowed, cbTransfer);
-        ASMAtomicXchgBool(&pBwMgr->fVMTransferLimitReached, true);
+        /* We are out of ressources  Check if we can update again. */
+        uint64_t tsNow          = RTTimeSystemNanoTS();
+        uint64_t tsUpdatedLast  = ASMAtomicUoReadU64(&pBwMgr->tsUpdatedLast);
+
+        if (tsNow - tsUpdatedLast >= (1000*1000*1000))
+        {
+            if (ASMAtomicCmpXchgU64(&pBwMgr->tsUpdatedLast, tsNow, tsUpdatedLast))
+            {
+                if (pBwMgr->cbVMTransferPerSecStart < pBwMgr->cbVMTransferPerSecMax)
+                {
+                   pBwMgr->cbVMTransferPerSecStart = RT_MIN(pBwMgr->cbVMTransferPerSecMax, pBwMgr->cbVMTransferPerSecStart + pBwMgr->cbVMTransferPerSecStep);
+                   LogFlow(("AIOMgr: Increasing maximum bandwidth to %u bytes/sec\n", pBwMgr->cbVMTransferPerSecStart));
+                }
+
+                /* Update */
+                ASMAtomicWriteU32(&pBwMgr->cbVMTransferAllowed, pBwMgr->cbVMTransferPerSecStart - cbTransfer);
+                fAllowed = true;
+                LogFlow(("AIOMgr: Refreshed bandwidth\n"));
+            }
+        }
+        else
+            ASMAtomicAddU32(&pBwMgr->cbVMTransferAllowed, cbTransfer);
     }
 
Index: /trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
===================================================================
--- /trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h	(revision 26688)
+++ /trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h	(revision 26689)
@@ -204,10 +204,8 @@
      * Resetted by the refresh timer. */
     volatile uint32_t cbVMTransferAllowed;
-    /** Flag whether a request could not processed due to the limit. */
-    volatile bool     fVMTransferLimitReached;
+    /** Timestamp of the last update */
+    volatile uint64_t tsUpdatedLast;
     /** Reference counter - How many endpoints are associated with this manager. */
     uint32_t          cRefs;
-    /** The refresh timer */
-    PTMTIMERR3        pBwRefreshTimer;
 } PDMACFILEBWMGR;
 /** Pointer to a bandwidth control manager */
Index: /trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
===================================================================
--- /trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp	(revision 26688)
+++ /trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp	(revision 26689)
@@ -1026,4 +1026,7 @@
         pAioMgr->iFreeEntryNext = (pAioMgr->iFreeEntryNext + 1) % pAioMgr->cReqEntries;
 
+        /* Free the lock and process pending tasks if neccessary */
+        pdmacFileAioMgrNormalRangeLockFree(pAioMgr, pEndpoint, pTask->pRangeLock);
+
         pAioMgr->cRequestsActive--;
         pEndpoint->AioMgr.cRequestsActive--;
