VirtualBox

Changeset 31834 in vbox


Ignore:
Timestamp:
Aug 21, 2010 12:52:39 AM (15 years ago)
Author:
vboxsync
Message:

PGMRZDynMap.cpp: Dropped the PGMMAPSET_MAX_FILL checks and instead make sure we can optimize the better.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInternal.h

    r31832 r31834  
    18001800/** Hash function for aiHashTable. */
    18011801#define PGMMAPSET_HASH(HCPhys)      (((HCPhys) >> PAGE_SHIFT) & 127)
    1802 
    1803 /** The max fill size (strict builds). */
    1804 #define PGMMAPSET_MAX_FILL          (64U * 80U / 100U)
    18051802
    18061803
  • trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp

    r31800 r31834  
    19241924#endif
    19251925        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    1926     AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    19271926    if (cEntries > RT_ELEMENTS(pSet->aEntries) * 50 / 100)
    19281927        Log(("PGMRZDynMapReleaseAutoSet: cEntries=%d\n", cEntries));
     
    19591958    {
    19601959        pSet->cEntries = 0;
    1961 
    1962         AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    19631960        Log(("PGMDynMapFlushAutoSet: cEntries=%d\n", pSet->cEntries));
    19641961
     
    20862083    LogFlow(("PGMRZDynMapPushAutoSubset: pVCpu=%p iPrevSubset=%u\n", pVCpu, iPrevSubset));
    20872084
     2085    /*
     2086     * If it looks like we're approaching the max set size or mapping space
     2087     * optimize the set to drop off unused pages.
     2088     */
     2089    if (   pSet->cEntries > RT_ELEMENTS(pSet->aEntries) * 60 / 100
    20882090#ifdef IN_RC
    2089     /* kludge */
    2090     if (pSet->cEntries > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE / 2)
     2091        || pSet->cEntries > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE / 2  /** @todo need to do this for r0 as well.*/
     2092#endif
     2093        )
    20912094    {
    20922095        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZDynMapSetOptimize);
    20932096        pgmDynMapOptimizeAutoSet(pSet);
    20942097    }
    2095 #endif
    20962098
    20972099    pSet->iSubset = pSet->cEntries;
     
    21252127        &&  cEntries != pSet->iSubset)
    21262128    {
    2127         AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    21282129        pgmDynMapFlushSubset(pSet);
    21292130        Assert(pSet->cEntries >= iPrevSubset || iPrevSubset == UINT32_MAX);
     
    23802381                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZDynMapSetSearchFlushes);
    23812382                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    2382                 AssertMsg(pSet->cEntries < PGMMAPSET_MAX_FILL, ("%u\n", pSet->cEntries));
    23832383                pgmDynMapFlushSubset(pSet);
    23842384            }
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