VirtualBox

Changeset 24070 in vbox for trunk


Ignore:
Timestamp:
Oct 26, 2009 12:41:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53943
Message:

DevBusLogic: Fixed bug in buslogicWaitForAsyncIOFinished causing an unnecessary 100ms delay on a number of operations requiring a quiescent controller. Moved buslogicLiveExec to the right place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r24067 r24070  
    22702270     */
    22712271    u64Start = RTTimeMilliTS();
    2272     do
     2272    for (;;)
    22732273    {
    22742274        fIdle = true;
     
    22842284            }
    22852285        }
    2286         if (RTTimeMilliTS() - u64Start >= cMillies)
     2286        if (   fIdle
     2287            || RTTimeMilliTS() - u64Start >= cMillies)
    22872288            break;
    22882289
    22892290        /* Sleep for a bit. */
    2290         RTThreadSleep(100);
    2291     } while (!fIdle);
     2291        RTThreadSleep(100); /** @todo wait on something which can be woken up. 100ms is too long for teleporting VMs! */
     2292    }
    22922293
    22932294    return fIdle;
    2294 }
    2295 
    2296 static DECLCALLBACK(int) buslogicSaveLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    2297 {
    2298     PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
    2299 
    2300     /* Wait that no task is pending on any device. */
    2301     if (!buslogicWaitForAsyncIOFinished(pBusLogic, 20000))
    2302     {
    2303         AssertLogRelMsgFailed(("BusLogic: There are still tasks outstanding\n"));
    2304         return VERR_TIMEOUT;
    2305     }
    2306 
    2307     return VINF_SUCCESS;
    23082295}
    23092296
     
    23172304
    23182305    return VINF_SSM_DONT_CALL_AGAIN;
     2306}
     2307
     2308static DECLCALLBACK(int) buslogicSaveLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     2309{
     2310    PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
     2311
     2312    /* Wait that no task is pending on any device. */
     2313    if (!buslogicWaitForAsyncIOFinished(pBusLogic, 20000))
     2314    {
     2315        AssertLogRelMsgFailed(("BusLogic: There are still tasks outstanding\n"));
     2316        return VERR_TIMEOUT;
     2317    }
     2318
     2319    return VINF_SUCCESS;
    23192320}
    23202321
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette