|
@@ -542,9 +542,13 @@ static size_t try_to_throw_mem_chunk(struct _starpu_mem_chunk *mc, unsigned node
|
|
|
|
|
|
target = choose_target(handle, node);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if (target != -1)
|
|
|
+ if (target != -1 &&
|
|
|
+
|
|
|
+ * away (which is likely thanks to periodic tidying).
|
|
|
+ * If there are none, we prefer to let generic eviction
|
|
|
+ * perhaps find other kinds of memchunks which will be
|
|
|
+ * earlier in LRU, and easier to throw away. */
|
|
|
+ (!replicate || handle->per_node[node].state != STARPU_OWNER))
|
|
|
{
|
|
|
int res;
|
|
|
|
|
@@ -805,7 +809,7 @@ restart:
|
|
|
}
|
|
|
|
|
|
|
|
|
- * Free the memory chuncks that are explicitely tagged to be freed.
|
|
|
+ * Free the memory chunks that are explicitely tagged to be freed.
|
|
|
*/
|
|
|
static size_t flush_memchunk_cache(unsigned node, size_t reclaim)
|
|
|
{
|