|
@@ -1519,9 +1519,9 @@ static starpu_ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, st
|
|
|
}
|
|
|
reclaim -= freed;
|
|
|
|
|
|
- if (is_prefetch)
|
|
|
+ if (is_prefetch >= STARPU_IDLEFETCH)
|
|
|
{
|
|
|
- /* It's just prefetch, don't bother existing allocations */
|
|
|
+ /* It's just idle fetch, don't bother existing allocations */
|
|
|
/* And don't bother tracing allocation attempts */
|
|
|
prefetch_out_of_memory[dst_node] = 1;
|
|
|
/* TODO: ideally we should not even try to allocate when we know we have not freed anything */
|
|
@@ -1547,8 +1547,17 @@ static starpu_ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, st
|
|
|
}
|
|
|
/* That was not enough, we have to really reclaim */
|
|
|
_STARPU_TRACE_START_MEMRECLAIM(dst_node,is_prefetch);
|
|
|
- _starpu_memory_reclaim_generic(dst_node, 0, reclaim, is_prefetch);
|
|
|
+ freed = _starpu_memory_reclaim_generic(dst_node, 0, reclaim, is_prefetch);
|
|
|
_STARPU_TRACE_END_MEMRECLAIM(dst_node,is_prefetch);
|
|
|
+
|
|
|
+ if (!freed && is_prefetch >= STARPU_FETCH)
|
|
|
+ {
|
|
|
+ /* It's just prefetch, don't bother tracing allocation attempts */
|
|
|
+ prefetch_out_of_memory[dst_node] = 1;
|
|
|
+ /* TODO: ideally we should not even try to allocate when we know we have not freed anything */
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
prefetch_out_of_memory[dst_node] = 0;
|
|
|
}
|
|
|
else
|