Changeset 91246 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 15, 2021 11:29:42 AM (3 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r91014 r91246 947 947 */ 948 948 # ifdef IN_RING3 949 rc = PGMR3PhysAllocateLarge HandyPage(pVM, GCPhysBase);949 rc = PGMR3PhysAllocateLargePage(pVM, GCPhysBase); 950 950 # else 951 951 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_ALLOCATE_LARGE_HANDY_PAGE, GCPhysBase); -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r91016 r91246 1310 1310 PGMSTATS *pStats = pVM->pgm.s.pStatsR3; 1311 1311 1312 PGM_REG_PROFILE(&pStats->StatAllocLargePage, "/PGM/LargePage/ Prof/Alloc","Time spent by the host OS for large page allocation.");1313 PGM_REG_PROFILE(&pStats->StatClearLargePage, "/PGM/LargePage/ Prof/Clear","Time spent clearing the newly allocated large pages.");1312 PGM_REG_PROFILE(&pStats->StatAllocLargePage, "/PGM/LargePage/Alloc", "Time spent by the host OS for large page allocation."); 1313 PGM_REG_PROFILE(&pStats->StatClearLargePage, "/PGM/LargePage/Clear", "Time spent clearing the newly allocated large pages."); 1314 1314 PGM_REG_COUNTER(&pStats->StatLargePageOverflow, "/PGM/LargePage/Overflow", "The number of times allocating a large page took too long."); 1315 PGM_REG_PROFILE(&pStats->StatR3IsValidLargePage, "/PGM/LargePage/ Prof/R3/IsValid","pgmPhysIsValidLargePage profiling - R3.");1316 PGM_REG_PROFILE(&pStats->StatRZIsValidLargePage, "/PGM/LargePage/ Prof/RZ/IsValid","pgmPhysIsValidLargePage profiling - RZ.");1315 PGM_REG_PROFILE(&pStats->StatR3IsValidLargePage, "/PGM/LargePage/IsValidR3", "pgmPhysIsValidLargePage profiling - R3."); 1316 PGM_REG_PROFILE(&pStats->StatRZIsValidLargePage, "/PGM/LargePage/IsValidRZ", "pgmPhysIsValidLargePage profiling - RZ."); 1317 1317 1318 1318 PGM_REG_COUNTER(&pStats->StatR3DetectedConflicts, "/PGM/R3/DetectedConflicts", "The number of times PGMR3CheckMappingConflicts() detected a conflict."); -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r91245 r91246 4930 4930 * @param GCPhys GC physical start address of the 2 MB range 4931 4931 */ 4932 VMMR3 DECL(int) PGMR3PhysAllocateLargeHandyPage(PVM pVM, RTGCPHYS GCPhys)4932 VMMR3_INT_DECL(int) PGMR3PhysAllocateLargePage(PVM pVM, RTGCPHYS GCPhys) 4933 4933 { 4934 4934 #ifdef PGM_WITH_LARGE_PAGES 4935 uint64_t u64TimeStamp1, u64TimeStamp2;4936 4937 4935 PGM_LOCK_VOID(pVM); 4938 4936 4939 4937 STAM_PROFILE_START(&pVM->pgm.s.CTX_SUFF(pStats)->StatAllocLargePage, a); 4940 u 64TimeStamp1= RTTimeMilliTS();4938 uint64_t const msAllocStart = RTTimeMilliTS(); 4941 4939 int rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_ALLOCATE_LARGE_HANDY_PAGE, 0, NULL); 4942 u 64TimeStamp2 = RTTimeMilliTS();4940 uint64_t const cMsElapsed = RTTimeMilliTS() - msAllocStart; 4943 4941 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_SUFF(pStats)->StatAllocLargePage, a); 4944 4942 if (RT_SUCCESS(rc)) … … 5012 5010 { 5013 5011 static uint32_t cTimeOut = 0; 5014 uint64_t u64TimeStampDelta = u64TimeStamp2 - u64TimeStamp1; 5015 5016 if (u64TimeStampDelta > 100) 5012 if (cMsElapsed > 100) 5017 5013 { 5018 5014 STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->StatLargePageOverflow); 5019 if ( 5020 || u64TimeStampDelta> 1000 /* more than one second forces an early retirement from allocating large pages. */)5015 if ( ++cTimeOut > 10 5016 || cMsElapsed > 1000 /* more than one second forces an early retirement from allocating large pages. */) 5021 5017 { 5022 5018 /* If repeated attempts to allocate a large page takes more than 100 ms, then we fall back to normal 4k pages. 5023 5019 * E.g. Vista 64 tries to move memory around, which takes a huge amount of time. 5024 5020 */ 5025 LogRel(("PGMR3PhysAllocateLargePage: allocating large pages takes too long (last attempt % d ms; nr of timeouts %d); DISABLE\n", u64TimeStampDelta, cTimeOut));5021 LogRel(("PGMR3PhysAllocateLargePage: allocating large pages takes too long (last attempt %RU64 ms; nr of timeouts %d); DISABLE\n", cMsElapsed, cTimeOut)); 5026 5022 PGMSetLargePageUsage(pVM, false); 5027 5023 } 5028 5024 } 5029 else 5030 if (cTimeOut > 0) 5025 else if (cTimeOut > 0) 5031 5026 cTimeOut--; 5032 5027 } -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r91245 r91246 2513 2513 case VMMCALLRING3_PGM_ALLOCATE_LARGE_HANDY_PAGE: 2514 2514 { 2515 pVCpu->vmm.s.rcCallRing3 = PGMR3PhysAllocateLarge HandyPage(pVM, pVCpu->vmm.s.u64CallRing3Arg);2515 pVCpu->vmm.s.rcCallRing3 = PGMR3PhysAllocateLargePage(pVM, pVCpu->vmm.s.u64CallRing3Arg); 2516 2516 break; 2517 2517 }
Note:
See TracChangeset
for help on using the changeset viewer.