VirtualBox

Changeset 23488 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Oct 1, 2009 3:38:06 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53113
Message:

PGM: Lock stats and check for write locks on monitored pages during live save.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r23471 r23488  
    10721072            unsigned cLocks = PGM_PAGE_GET_WRITE_LOCKS(pPage);
    10731073            if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1))
     1074            {
     1075                if (cLocks == 0)
     1076                    pVM->pgm.s.cWriteLockedPages++;
    10741077                PGM_PAGE_INC_WRITE_LOCKS(pPage);
     1078            }
    10751079            else if (cLocks != PGM_PAGE_GET_WRITE_LOCKS(pPage))
    10761080            {
     
    11701174            unsigned cLocks = PGM_PAGE_GET_READ_LOCKS(pPage);
    11711175            if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1))
     1176            {
     1177                if (cLocks == 0)
     1178                    pVM->pgm.s.cReadLockedPages++;
    11721179                PGM_PAGE_INC_READ_LOCKS(pPage);
     1180            }
    11731181            else if (cLocks != PGM_PAGE_GET_READ_LOCKS(pPage))
    11741182            {
     
    12931301        Assert(cLocks > 0);
    12941302        if (RT_LIKELY(cLocks > 0 && cLocks < PGM_PAGE_MAX_LOCKS))
     1303        {
     1304            if (cLocks == 1)
     1305            {
     1306                Assert(pVM->pgm.s.cWriteLockedPages > 0);
     1307                pVM->pgm.s.cWriteLockedPages--;
     1308            }
    12951309            PGM_PAGE_DEC_WRITE_LOCKS(pPage);
     1310        }
    12961311
    12971312        if (PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED)
     
    13091324        Assert(cLocks > 0);
    13101325        if (RT_LIKELY(cLocks > 0 && cLocks < PGM_PAGE_MAX_LOCKS))
     1326        {
     1327            if (cLocks == 1)
     1328            {
     1329                Assert(pVM->pgm.s.cReadLockedPages > 0);
     1330                pVM->pgm.s.cReadLockedPages--;
     1331            }
    13111332            PGM_PAGE_DEC_READ_LOCKS(pPage);
     1333        }
    13121334    }
    13131335
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