VirtualBox

Changeset 92420 in vbox


Ignore:
Timestamp:
Nov 15, 2021 8:47:32 AM (3 years ago)
Author:
vboxsync
Message:

VMM/PGM: Deal with VERR_NOT_SUPPORTED by RTR0MemObjLargeAlloc/GMMR0AllocateLargePage. Statistics. bugref:10093 bugref:5324

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

Legend:

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

    r92390 r92420  
    363363int pgmR0PhysAllocateLargePage(PGVM pGVM, VMCPUID idCpu, RTGCPHYS GCPhys)
    364364{
    365     STAM_PROFILE_ADV_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, a);
     365    STAM_PROFILE_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, a);
    366366    PGM_LOCK_ASSERT_OWNER_EX(pGVM, &pGVM->aCpus[idCpu]);
    367367
     
    411411        {
    412412            Log(("PGMR0PhysAllocateLargePage: Failed: %Rrc\n", rc));
     413            STAM_REL_COUNTER_INC(&pGVM->pgm.s.StatLargePageAllocFailed);
     414            if (rc == VERR_NOT_SUPPORTED)
     415            {
     416                LogRel(("PGM: Disabling large pages because of VERR_NOT_SUPPORTED status.\n"));
     417                PGMSetLargePageUsage(pGVM, false);
     418            }
    413419            return rc;
    414420        }
    415421    }
    416422
    417     STAM_PROFILE_ADV_STOP_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, &pGVM->pgm.s.Stats.StatLargePageSetup, a);
     423    STAM_PROFILE_STOP_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, &pGVM->pgm.s.Stats.StatLargePageSetup, a);
    418424
    419425    /*
     
    475481    pgmPhysInvalidatePageMapTLB(pGVM);
    476482
    477     STAM_PROFILE_ADV_STOP(&pGVM->pgm.s.Stats.StatLargePageSetup, a);
     483    STAM_PROFILE_STOP(&pGVM->pgm.s.Stats.StatLargePageSetup, a);
    478484#if 0 /** @todo returning info statuses here might not be a great idea... */
    479485    LogFlow(("PGMR0PhysAllocateLargePage: returns %Rrc\n", VBOXSTRICTRC_VAL(rc) ));
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r92409 r92420  
    12211221
    12221222    PGM_REG_PROFILE_NS(&pPGM->StatLargePageAlloc,               "/PGM/LargePage/Alloc",               "Time spent by the host OS for large page allocation.");
     1223    PGM_REG_COUNTER(&pPGM->StatLargePageAllocFailed,            "/PGM/LargePage/AllocFailed",         "Number of allocation failures.");
    12231224    PGM_REG_COUNTER(&pPGM->StatLargePageOverflow,               "/PGM/LargePage/Overflow",            "The number of times allocating a large page took too long.");
    12241225    PGM_REG_COUNTER(&pPGM->StatLargePageTlbFlush,               "/PGM/LargePage/TlbFlush",            "The number of times a full VCPU TLB flush was required after a large allocation.");
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r92391 r92420  
    30153015    STAMPROFILE StatTrackDeref;                     /**< Profiling of SyncPageWorkerTrackDeref (expensive). */
    30163016
    3017     STAMPROFILEADV StatLargePageAlloc2;            /**< Time spent setting up newly allocated large pages. */
    3018     STAMPROFILEADV StatLargePageSetup;             /**< Time spent setting up newly allocated large pages. */
     3017    STAMPROFILE StatLargePageAlloc2;                /**< Time spent setting up newly allocated large pages. */
     3018    STAMPROFILE StatLargePageSetup;                 /**< Time spent setting up newly allocated large pages. */
    30193019    /** pgmPhysIsValidLargePage profiling - R3 */
    30203020    STAMPROFILE StatR3IsValidLargePage;
     
    33233323
    33243324    STAMPROFILE                     StatLargePageAlloc;     /**< Time spent by the host OS for large page allocation. */
     3325    STAMCOUNTER                     StatLargePageAllocFailed; /**< Count allocation failures. */
    33253326    STAMCOUNTER                     StatLargePageOverflow;  /**< The number of times allocating a large pages takes more than the allowed period. */
    33263327    STAMCOUNTER                     StatLargePageReused;    /**< The number of large pages we've reused.*/
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