- Timestamp:
- Aug 21, 2010 1:19:56 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
r31834 r31838 254 254 uint32_t cLoad; 255 255 /** The max load ever. 256 * This is maintained to get triggeradding of more mapping space. */256 * This is maintained to trigger the adding of more mapping space. */ 257 257 uint32_t cMaxLoad; 258 258 # ifndef IN_RC … … 1865 1865 1866 1866 /** 1867 * Checks if the set has high load. 1868 * 1869 * @returns true on high load, otherwise false. 1870 * @param pSet The set. 1871 */ 1872 DECLINLINE(bool) pgmRZDynMapHasHighLoad(PPGMMAPSET pSet) 1873 { 1874 #ifdef IN_RC 1875 if (pSet->cEntries < MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE / 2) 1876 return false; 1877 #endif 1878 1879 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet); 1880 uint32_t cUnusedPages = pThis->cPages - pThis->cLoad; 1881 #ifdef IN_RC 1882 return cUnusedPages <= MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE * 36 / 100; 1883 #else 1884 return cUnusedPages <= PGMR0DYNMAP_PAGES_PER_CPU_MIN; 1885 #endif 1886 } 1887 1888 1889 /** 1867 1890 * Worker that performs the actual flushing of the set. 1868 1891 * … … 1955 1978 #endif 1956 1979 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]); 1957 if (cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100) 1980 if ( cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100 1981 || pgmRZDynMapHasHighLoad(pSet)) 1958 1982 { 1959 1983 pSet->cEntries = 0; … … 2088 2112 */ 2089 2113 if ( pSet->cEntries > RT_ELEMENTS(pSet->aEntries) * 60 / 100 2090 #ifdef IN_RC 2091 || pSet->cEntries > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE / 2 /** @todo need to do this for r0 as well.*/ 2092 #endif 2093 ) 2114 || pgmRZDynMapHasHighLoad(pSet)) 2094 2115 { 2095 2116 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZDynMapSetOptimize);
Note:
See TracChangeset
for help on using the changeset viewer.