VirtualBox

Changeset 24875 in vbox


Ignore:
Timestamp:
Nov 23, 2009 4:04:20 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55136
Message:

pgmR3LiveVote: Take the current dirty page count into consideration and not only the averages.

File:
1 edited

Legend:

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

    r24874 r24875  
    17851785    uint32_t const cWrittenToPages = pVM->pgm.s.cWrittenToPages;
    17861786    pgmUnlock(pVM);
     1787    uint32_t const cDirtyNow = pVM->pgm.s.LiveSave.Rom.cDirtyPages
     1788                             + pVM->pgm.s.LiveSave.Mmio2.cDirtyPages
     1789                             + pVM->pgm.s.LiveSave.Ram.cDirtyPages
     1790                             + cWrittenToPages;
    17871791    uint32_t i = pVM->pgm.s.LiveSave.iDirtyPagesHistory;
    1788     pVM->pgm.s.LiveSave.acDirtyPagesHistory[i] = pVM->pgm.s.LiveSave.Rom.cDirtyPages
    1789                                                + pVM->pgm.s.LiveSave.Mmio2.cDirtyPages
    1790                                                + pVM->pgm.s.LiveSave.Ram.cDirtyPages
    1791                                                + cWrittenToPages;
     1792    pVM->pgm.s.LiveSave.acDirtyPagesHistory[i] = cDirtyNow;
    17921793    pVM->pgm.s.LiveSave.iDirtyPagesHistory = (i + 1) % cHistoryEntries;
    17931794
     
    18211822     * Try make a decision.
    18221823     */
    1823     if (cDirtyPagesShort <= cDirtyPagesLong)
     1824    if (    cDirtyPagesShort <= cDirtyPagesLong
     1825        &&  (   cDirtyNow    <= cDirtyPagesShort
     1826             || cDirtyNow - cDirtyPagesShort < cDirtyPagesShort / 8
     1827            )
     1828       )
    18241829    {
    18251830        if (uPass > 10)
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