VirtualBox

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


Ignore:
Timestamp:
Feb 10, 2019 4:34:51 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128747
Message:

PGMPool: Two optimizations to the dirty page code (PGMPOOL_WITH_OPTIMIZED_DIRTY_PT): Inline the first part of pgmPoolIsDirtyPage so we don't waste time on a full fledged call for nested paging. Split the PGMPOOL::aDirtyPages structure into index and page data so we can scan the indexes without requiring a cache line load for each entry. Also eliminated some double uIdx reads and checks.

File:
1 edited

Legend:

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

    r76553 r77240  
    743743    for (unsigned i = 0; i < RT_ELEMENTS(pPool->aDirtyPages); i++)
    744744    {
    745         PPGMPOOLPAGE pPage;
    746         unsigned     idxPage;
    747 
    748         if (pPool->aDirtyPages[i].uIdx == NIL_PGMPOOL_IDX)
     745        unsigned idxPage = pPool->aidxDirtyPages[i];
     746        if (idxPage == NIL_PGMPOOL_IDX)
    749747            continue;
    750748
    751         idxPage = pPool->aDirtyPages[i].uIdx;
    752         AssertRelease(idxPage != NIL_PGMPOOL_IDX);
    753         pPage = &pPool->aPages[idxPage];
     749        PPGMPOOLPAGE pPage = &pPool->aPages[idxPage];
    754750        Assert(pPage->idx == idxPage);
    755751        Assert(pPage->iMonitoredNext == NIL_PGMPOOL_IDX && pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
     
    764760        pPage->fDirty = false;
    765761
    766         pPool->aDirtyPages[i].uIdx = NIL_PGMPOOL_IDX;
     762        pPool->aidxDirtyPages[i] = NIL_PGMPOOL_IDX;
    767763    }
    768764
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