[NTOSKRNL]
authorJérôme Gardou <jerome.gardou@reactos.org>
Mon, 23 Jul 2012 00:52:01 +0000 (00:52 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Mon, 23 Jul 2012 00:52:01 +0000 (00:52 +0000)
- Raise system PTE count to 44000 for system with more than 256MB of RAM.
- http://www.osronline.com/ddkx/appendix/enhancements5_3oc3.htm claims that winXP supports a 960MB-contiguous mapping...

svn path=/trunk/; revision=56943

reactos/ntoskrnl/mm/ARM3/miarm.h
reactos/ntoskrnl/mm/ARM3/mminit.c

index 78b7400..67302b4 100644 (file)
@@ -11,6 +11,7 @@
 #define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING   ((255 * _1MB) >> PAGE_SHIFT)
 #define MI_MIN_PAGES_FOR_SYSPTE_TUNING          ((19 * _1MB) >> PAGE_SHIFT)
 #define MI_MIN_PAGES_FOR_SYSPTE_BOOST           ((32 * _1MB) >> PAGE_SHIFT)
+#define MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST     ((256 * _1MB) >> PAGE_SHIFT)
 #define MI_MAX_INIT_NONPAGED_POOL_SIZE          (128 * _1MB)
 #define MI_MAX_NONPAGED_POOL_SIZE               (128 * _1MB)
 #define MI_MAX_FREE_PAGE_LISTS                  4
@@ -50,6 +51,8 @@
     (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
 #define MI_LOWEST_VAD_ADDRESS                   (PVOID)MM_LOWEST_USER_ADDRESS
 
+#define MI_DEFAULT_SYSTEM_PTE_COUNT             50000
+
 #endif /* !_M_AMD64 */
 
 /* Make the code cleaner with some definitions for size multiples */
index 8398295..f18323e 100644 (file)
@@ -2108,7 +2108,7 @@ MmArmInitSystem(IN ULONG Phase,
         else
         {
             //
-            // Use the default, but check if we have more than 32MB of RAM
+            // Use the default
             //
             MmNumberOfSystemPtes = 11000;
             if (PageCount > MI_MIN_PAGES_FOR_SYSPTE_BOOST)
@@ -2118,6 +2118,13 @@ MmArmInitSystem(IN ULONG Phase,
                 //
                 MmNumberOfSystemPtes <<= 1;
             }
+            if (PageCount > MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST)
+            {
+                //
+                // Double the amount of system PTEs
+                //
+                MmNumberOfSystemPtes <<= 1;
+            }
         }
 
         DPRINT("System PTE count has been tuned to %d (%d bytes)\n",