VirtualBox

Changeset 87819 in vbox


Ignore:
Timestamp:
Feb 20, 2021 10:24:03 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142880
Message:

VMM: Disabled the EMT yield timer as it is out dated (multi core CPUs) and will be pointless when timers move off the EMTs. bugref:9943

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r87766 r87819  
    205205    pVM->vmm.s.hEvtRendezvousRecursionPopCaller = NIL_RTSEMEVENT;
    206206
     207#if 0 /* pointless when timers doesn't run on EMT */
    207208    /** @cfgm{/YieldEMTInterval, uint32_t, 1, UINT32_MAX, 23, ms}
    208209     * The EMT yield interval.  The EMT yielding is a hack we employ to play a
     
    212213                               23 /* Value arrived at after experimenting with the grub boot prompt. */);
    213214    AssertMsgRCReturn(rc, ("Configuration error. Failed to query \"YieldEMTInterval\", rc=%Rrc\n", rc), rc);
    214 
     215#endif
    215216
    216217    /** @cfgm{/VMM/UsePeriodicPreemptionTimers, boolean, true}
     
    222223     */
    223224    PCFGMNODE pCfgVMM = CFGMR3GetChild(CFGMR3GetRoot(pVM), "VMM");
    224     rc = CFGMR3QueryBoolDef(pCfgVMM, "UsePeriodicPreemptionTimers", &pVM->vmm.s.fUsePeriodicPreemptionTimers, true);
     225    int rc = CFGMR3QueryBoolDef(pCfgVMM, "UsePeriodicPreemptionTimers", &pVM->vmm.s.fUsePeriodicPreemptionTimers, true);
    225226    AssertMsgRCReturn(rc, ("Configuration error. Failed to query \"VMM/UsePeriodicPreemptionTimers\", rc=%Rrc\n", rc), rc);
    226227
     
    657658        case VMINITCOMPLETED_RING3:
    658659        {
     660#if 0 /* pointless when timers doesn't run on EMT */
    659661            /*
    660662             * Create the EMT yield timer.
     
    666668            rc = TMTimerSetMillies(pVM, pVM->vmm.s.hYieldTimer, pVM->vmm.s.cYieldEveryMillies);
    667669            AssertRCReturn(rc, rc);
     670#endif
    668671            break;
    669672        }
     
    995998VMMR3_INT_DECL(void) VMMR3YieldSuspend(PVM pVM)
    996999{
     1000#if 0 /* pointless when timers doesn't run on EMT */
    9971001    VMCPU_ASSERT_EMT(pVM->apCpusR3[0]);
    9981002    if (!pVM->vmm.s.cYieldResumeMillies)
     
    10071011    }
    10081012    pVM->vmm.s.u64LastYield = RTTimeNanoTS();
     1013#else
     1014    RT_NOREF(pVM);
     1015#endif
    10091016}
    10101017
     
    10171024VMMR3_INT_DECL(void) VMMR3YieldStop(PVM pVM)
    10181025{
     1026#if 0 /* pointless when timers doesn't run on EMT */
    10191027    if (!pVM->vmm.s.cYieldResumeMillies)
    10201028        TMTimerStop(pVM, pVM->vmm.s.hYieldTimer);
    10211029    pVM->vmm.s.cYieldResumeMillies = pVM->vmm.s.cYieldEveryMillies;
    10221030    pVM->vmm.s.u64LastYield = RTTimeNanoTS();
     1031#else
     1032    RT_NOREF(pVM);
     1033#endif
    10231034}
    10241035
     
    10311042VMMR3_INT_DECL(void) VMMR3YieldResume(PVM pVM)
    10321043{
     1044#if 0 /* pointless when timers doesn't run on EMT */
    10331045    if (pVM->vmm.s.cYieldResumeMillies)
    10341046    {
     
    10361048        pVM->vmm.s.cYieldResumeMillies = 0;
    10371049    }
    1038 }
    1039 
    1040 
     1050#else
     1051    RT_NOREF(pVM);
     1052#endif
     1053}
     1054
     1055
     1056#if 0 /* pointless when timers doesn't run on EMT */
    10411057/**
    10421058 * @callback_method_impl{FNTMTIMERINT, EMT yielder}
     
    10771093    TMTimerSetMillies(pVM, hTimer, pVM->vmm.s.cYieldEveryMillies);
    10781094}
     1095#endif
    10791096
    10801097
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r87766 r87819  
    192192    bool                        afPadding0[7];
    193193
     194#if 0 /* pointless when timers doesn't run on EMT */
    194195    /** The EMT yield timer. */
    195196    TMTIMERHANDLE               hYieldTimer;
     
    201202    /** The timestamp of the previous yield. (nano) */
    202203    uint64_t                    u64LastYield;
     204#endif
    203205
    204206    /** @name EMT Rendezvous
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r87812 r87819  
    255255    CHECK_MEMBER_ALIGNMENT(VMCPU, vmm.s.CallRing3JmpBufR0.xmm6, 16);
    256256#endif
    257     CHECK_MEMBER_ALIGNMENT(VM, vmm.s.u64LastYield, 8);
    258257
    259258    /* the VMCPUs are page aligned TLB hit reasons. */
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