VirtualBox

Changeset 100147 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jun 9, 2023 4:16:06 PM (20 months ago)
Author:
vboxsync
Message:

VMM/VMMR3/VMEmt: Fix mixing nanoseconds and millisecond timestamps causing the wait loop to exit way too early in many cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VMEmt.cpp

    r100002 r100147  
    628628            VMMR3YieldStop(pVM);
    629629
    630             uint32_t cMilliSecs = RT_MIN(u64NanoTS / 1000000, 15);
    631             if (cMilliSecs <= pUVCpu->vm.s.Halt.Method12.cNSBlockedTooLongAvg)
     630            uint32_t cMilliSecs = RT_MIN(u64NanoTS / RT_NS_1MS, 15);
     631            if (cMilliSecs <= pUVCpu->vm.s.Halt.Method12.cNSBlockedTooLongAvg / RT_NS_1MS)
    632632                cMilliSecs = 1;
    633633            else
    634                 cMilliSecs -= pUVCpu->vm.s.Halt.Method12.cNSBlockedTooLongAvg;
     634                cMilliSecs -= pUVCpu->vm.s.Halt.Method12.cNSBlockedTooLongAvg / RT_NS_1MS;
    635635
    636636            //RTLogRelPrintf("u64NanoTS=%RI64 cLoops=%3d sleep %02dms (%7RU64) ", u64NanoTS, cLoops, cMilliSecs, u64NanoTS);
Note: See TracChangeset for help on using the changeset viewer.

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