VirtualBox

Ignore:
Timestamp:
Dec 13, 2008 11:59:30 AM (16 years ago)
Author:
vboxsync
Message:

PGMR0DynMap: Corrected PGMR0DYNMAP_PAGES_PER_CPU_MIN (>= max set size). Added set size stats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp

    r15434 r15436  
    5252/** The minimum number of pages we reserve per CPU.
    5353 * This must be equal or larger than the autoset size.  */
    54 #define PGMR0DYNMAP_PAGES_PER_CPU_MIN       32
     54#define PGMR0DYNMAP_PAGES_PER_CPU_MIN       64
    5555/** The number of guard pages.
    5656 * @remarks Never do tuning of the hashing or whatnot with a strict build!  */
     
    15661566    pSet->iCpu = -1;
    15671567
     1568    STAM_COUNTER_INC(&pVCpu->pVMR0->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    15681569    AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    15691570    if (cEntries > RT_ELEMENTS(pSet->aEntries) * 50 / 100)
     
    15891590    uint32_t cEntries = pSet->cEntries;
    15901591    AssertReturnVoid(cEntries != PGMMAPSET_CLOSED);
     1592    STAM_COUNTER_INC(&pVCpu->pVMR0->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    15911593    if (cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100)
    15921594    {
     
    17331735{
    17341736    PPGMMAPSET      pSet = &pVCpu->pgm.s.AutoSet;
    1735     AssertReturnVoid(pSet->cEntries != PGMMAPSET_CLOSED);
     1737    uint32_t        cEntries = pSet->cEntries;
     1738    AssertReturnVoid(cEntries != PGMMAPSET_CLOSED);
    17361739    AssertReturnVoid(pSet->iSubset <= iPrevSubset || iPrevSubset == UINT32_MAX);
    17371740Assert(iPrevSubset == UINT32_MAX);
    1738     if (    pSet->cEntries >= RT_ELEMENTS(pSet->aEntries) * 40 / 100
    1739         &&  pSet->cEntries != pSet->iSubset)
    1740     {
    1741         AssertMsg(pSet->cEntries < PGMMAPSET_MAX_FILL, ("%u\n", pSet->cEntries));
    1742         STAM_COUNTER_INC(&pVCpu->pVMR0->pgm.s.StatR0DynMapPopFlushes);
     1741    STAM_COUNTER_INC(&pVCpu->pVMR0->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
     1742    if (    cEntries >= RT_ELEMENTS(pSet->aEntries) * 40 / 100
     1743        &&  cEntries != pSet->iSubset)
     1744    {
     1745        AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    17431746        pgmDynMapFlushSubset(pSet);
    17441747    }
     
    18881891            {
    18891892                STAM_COUNTER_INC(&pVM->pgm.s.StatR0DynMapSetSearchFlushes);
     1893                STAM_COUNTER_INC(&pVM->pgm.s.aStatR0DynMapSetSize[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    18901894                AssertMsg(pSet->cEntries < PGMMAPSET_MAX_FILL, ("%u\n", pSet->cEntries));
    18911895                pgmDynMapFlushSubset(pSet);
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