Explorar el Código

Disable forcing available memory by default, since this makes StarPU spuriously free data when prefetching fills the memory. Clean buffers are enough to be able to allocate data easily anyway.

Samuel Thibault hace 8 años
padre
commit
72453f9f98

+ 2 - 2
doc/doxygen/chapters/501_environment_variables.doxy

@@ -812,7 +812,7 @@ cache in main memory
 \addindex __env__STARPU_MINIMUM_AVAILABLE_MEM
 This specifies the minimum percentage of memory that should be available in GPUs
 (or in main memory, when using out of core), below which a reclaiming pass is
-performed. The default is 5%.
+performed. The default is 0%.
 </dd>
 
 <dt>STARPU_TARGET_AVAILABLE_MEM</dt>
@@ -821,7 +821,7 @@ performed. The default is 5%.
 \addindex __env__STARPU_TARGET_AVAILABLE_MEM
 This specifies the target percentage of memory that should be reached in
 GPUs (or in main memory, when using out of core), when performing a periodic
-reclaiming pass. The default is 10%.
+reclaiming pass. The default is 0%.
 </dd>
 
 <dt>STARPU_MINIMUM_CLEAN_BUFFERS</dt>

+ 2 - 1
doc/doxygen/chapters/api/standard_memory_library.doxy

@@ -45,7 +45,8 @@ to indicate that while the memory allocation should be kept in the limits
 defined for ::STARPU_MALLOC_COUNT, no reclaiming should be performed by
 starpu_malloc_flags() itself, thus potentially overflowing the
 memory node a bit. StarPU will reclaim memory after next task termination,
-according to \ref STARPU_MINIMUM_AVAILABLE_MEM and \ref STARPU_TARGET_AVAILABLE_MEM
+according to the \ref STARPU_MINIMUM_AVAILABLE_MEM, \ref STARPU_TARGET_AVAILABLE_MEM,
+\ref STARPU_MINIMUM_CLEAN_BUFFERS, and \ref STARPU_TARGET_CLEAN_BUFFERS
 environment variables. If ::STARPU_MEMORY_WAIT is set, no overflowing will happen,
 starpu_malloc_flags() will wait for other eviction mechanisms to release enough memory.
 

+ 2 - 2
src/datawizard/memalloc.c

@@ -131,8 +131,8 @@ void _starpu_init_mem_chunk_lists(void)
 		STARPU_HG_DISABLE_CHECKING(mc_nb[i]);
 		STARPU_HG_DISABLE_CHECKING(mc_clean_nb[i]);
 	}
-	minimum_p = starpu_get_env_number_default("STARPU_MINIMUM_AVAILABLE_MEM", 5);
-	target_p = starpu_get_env_number_default("STARPU_TARGET_AVAILABLE_MEM", 10);
+	minimum_p = starpu_get_env_number_default("STARPU_MINIMUM_AVAILABLE_MEM", 0);
+	target_p = starpu_get_env_number_default("STARPU_TARGET_AVAILABLE_MEM", 0);
 	minimum_clean_p = starpu_get_env_number_default("STARPU_MINIMUM_CLEAN_BUFFERS", 5);
 	target_clean_p = starpu_get_env_number_default("STARPU_TARGET_CLEAN_BUFFERS", 10);
 	limit_cpu_mem = starpu_get_env_number("STARPU_LIMIT_CPU_MEM");