Browse Source

Drop duplicated 'requested' field

Samuel Thibault 4 years ago
parent
commit
ef93ae6cf5

+ 1 - 25
src/datawizard/coherency.c

@@ -179,7 +179,6 @@ void _starpu_update_data_state(starpu_data_handle_t handle,
 
 	/* the data is present now */
 	unsigned requesting_node = requesting_replicate->memory_node;
-	requesting_replicate->requested &= ~(1UL << requesting_node);
 
 	if (mode & STARPU_W)
 	{
@@ -901,26 +900,6 @@ void _starpu_release_data_on_node(starpu_data_handle_t handle, uint32_t default_
 		_starpu_spin_unlock(&handle->header_lock);
 }
 
-static void _starpu_set_data_requested_flag_if_needed(starpu_data_handle_t handle, struct _starpu_data_replicate *replicate)
-{
-	int cpt = 0;
-	while (cpt < STARPU_SPIN_MAXTRY && _starpu_spin_trylock(&handle->header_lock))
-	{
-		cpt++;
-		_starpu_datawizard_progress(1);
-	}
-	if (cpt == STARPU_SPIN_MAXTRY)
-		_starpu_spin_lock(&handle->header_lock);
-
-	if (replicate->state == STARPU_INVALID)
-	{
-		unsigned dst_node = replicate->memory_node;
-		replicate->requested |= 1UL << dst_node;
-	}
-
-	_starpu_spin_unlock(&handle->header_lock);
-}
-
 int _starpu_prefetch_task_input_prio(struct starpu_task *task, int target_node, int worker, int prio, enum starpu_is_prefetch prefetch)
 {
 #ifdef STARPU_OPENMP
@@ -949,10 +928,7 @@ int _starpu_prefetch_task_input_prio(struct starpu_task *task, int target_node,
 
 		struct _starpu_data_replicate *replicate = &handle->per_node[node];
 		if (prefetch == STARPU_PREFETCH)
-		{
 			task_prefetch_data_on_node(handle, node, replicate, mode, prio);
-			_starpu_set_data_requested_flag_if_needed(handle, replicate);
-		}
 		else
 			idle_prefetch_data_on_node(handle, node, replicate, mode, prio);
 	}
@@ -1425,7 +1401,7 @@ unsigned starpu_data_is_on_node(starpu_data_handle_t handle, unsigned node)
 
 		for (i = 0; i < nnodes; i++)
 		{
-			if ((handle->per_node[node].requested & (1UL << i)) || handle->per_node[node].request[i])
+			if (handle->per_node[node].request[i])
 				ret = 1;
 		}
 

+ 0 - 1
src/datawizard/coherency.h

@@ -79,7 +79,6 @@ struct _starpu_data_replicate
 	   flag when it assigns a task to a queue, policies which do not
 	   use this hint can simply ignore it.
 	 */
-	uint32_t requested;
 	struct _starpu_data_request *request[STARPU_MAXNODES];
 
 	/** The number of prefetches that we made for this replicate for various tasks

+ 0 - 1
src/datawizard/interfaces/data_interface.c

@@ -375,7 +375,6 @@ _starpu_data_initialize_per_worker(starpu_data_handle_t handle)
 		replicate->state = STARPU_INVALID;
 		//replicate->refcnt = 0;
 		replicate->handle = handle;
-		//replicate->requested = 0;
 		//replicate->nb_tasks_prefetch = 0;
 
 		//for (node = 0; node < STARPU_MAXNODES; node++)

+ 1 - 1
src/datawizard/user_interactions.c

@@ -817,7 +817,7 @@ void starpu_data_query_status(starpu_data_handle_t handle, int memory_node, int
 		unsigned node;
 		for (node = 0; node < STARPU_MAXNODES; node++)
 		{
-			if (handle->per_node[memory_node].requested & (1UL << node))
+			if (handle->per_node[memory_node].request[node])
 			{
 				requested = 1;
 				break;

+ 0 - 3
tools/gdbinit

@@ -606,9 +606,6 @@ define starpu-print-replicate
   if $repl->automatically_allocated
     printf " automatically allocated"
   end
-  if $repl->requested
-    printf " requested"
-  end
   printf "\n"
   printf "MC %p\n", $repl->mc
 end