]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/vm/vm_phantom_cache.c
xnu-4570.71.2.tar.gz
[apple/xnu.git] / osfmk / vm / vm_phantom_cache.c
index 4d80437025e59a98059432b41332c8c6b207a4ec..a075f53facd96359d3d24d7f2cd3049837f58bc8 100644 (file)
 
 uint32_t phantom_cache_eval_period_in_msecs = 250;
 uint32_t phantom_cache_thrashing_threshold_ssd = 1000;
 
 uint32_t phantom_cache_eval_period_in_msecs = 250;
 uint32_t phantom_cache_thrashing_threshold_ssd = 1000;
+#if CONFIG_EMBEDDED
+uint32_t phantom_cache_thrashing_threshold = 500;
+#else
 uint32_t phantom_cache_thrashing_threshold = 100;
 uint32_t phantom_cache_thrashing_threshold = 100;
+#endif
 
 /*
  * Number of consecutive thrashing periods required before
  * vm_phantom_cache_check_pressure() returns true.
  */
 
 /*
  * Number of consecutive thrashing periods required before
  * vm_phantom_cache_check_pressure() returns true.
  */
+#if CONFIG_EMBEDDED
+unsigned phantom_cache_contiguous_periods = 4;
+#else
 unsigned phantom_cache_contiguous_periods = 2;
 unsigned phantom_cache_contiguous_periods = 2;
+#endif
 
 clock_sec_t    pc_start_of_eval_period_sec = 0;
 clock_nsec_t   pc_start_of_eval_period_nsec = 0;
 
 clock_sec_t    pc_start_of_eval_period_sec = 0;
 clock_nsec_t   pc_start_of_eval_period_nsec = 0;
@@ -103,7 +111,11 @@ vm_phantom_cache_init()
 
        if ( !VM_CONFIG_COMPRESSOR_IS_ACTIVE)
                return;
 
        if ( !VM_CONFIG_COMPRESSOR_IS_ACTIVE)
                return;
+#if CONFIG_EMBEDDED
+       num_entries = (uint32_t)(((max_mem / PAGE_SIZE) / 10) / VM_GHOST_PAGES_PER_ENTRY);
+#else
        num_entries = (uint32_t)(((max_mem / PAGE_SIZE) / 4) / VM_GHOST_PAGES_PER_ENTRY);
        num_entries = (uint32_t)(((max_mem / PAGE_SIZE) / 4) / VM_GHOST_PAGES_PER_ENTRY);
+#endif
        vm_phantom_cache_num_entries = 1;
 
        while (vm_phantom_cache_num_entries < num_entries)
        vm_phantom_cache_num_entries = 1;
 
        while (vm_phantom_cache_num_entries < num_entries)