Browse Source

make wont_use flush non-homed ooc data too

Samuel Thibault 6 years ago
parent
commit
df340a0574
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/datawizard/user_interactions.c

+ 14 - 0
src/datawizard/user_interactions.c

@@ -631,6 +631,20 @@ static void _starpu_data_wont_use(void *data)
 	starpu_data_release_on_node(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL);
 	if (handle->home_node != -1)
 		starpu_data_idle_prefetch_on_node(handle, handle->home_node, 1);
+	else
+	{
+		if (handle->ooc)
+		{
+			/* Try to push it to some disk */
+			unsigned i;
+			unsigned nnodes = starpu_memory_nodes_get_count();
+			for (i = 0; i < nnodes; i++)
+			{
+				if (starpu_node_get_kind(i) == STARPU_DISK_RAM)
+					starpu_data_idle_prefetch_on_node(handle, i, 1);
+			}
+		}
+	}
 }
 
 void starpu_data_wont_use(starpu_data_handle_t handle)