Forráskód Böngészése

Do not bother telling _starpu_post_data_request which node is handler for the request, it can determine it by itself from the request, and it is actually more right when the request is an invalidation, for which the handler is undetermined (-1)

Samuel Thibault 8 éve
szülő
commit
91f985c664

+ 1 - 1
src/datawizard/coherency.c

@@ -718,7 +718,7 @@ struct _starpu_data_request *_starpu_create_request_to_fetch_data(starpu_data_ha
 	/* we only submit the first request, the remaining will be
 	 * automatically submitted afterward */
 	if (!reused_requests[0])
-		_starpu_post_data_request(requests[0], handling_nodes[0]);
+		_starpu_post_data_request(requests[0]);
 
 	return requests[nhops - 1];
 }

+ 4 - 3
src/datawizard/data_request.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2016  Université de Bordeaux
+ * Copyright (C) 2009-2017  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  CNRS
  * Copyright (C) 2016  INRIA
  *
@@ -287,8 +287,9 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 }
 
 /* this is non blocking */
-void _starpu_post_data_request(struct _starpu_data_request *r, unsigned handling_node)
+void _starpu_post_data_request(struct _starpu_data_request *r)
 {
+	unsigned handling_node = r->handling_node;
 	/* We don't have a worker for disk nodes, these should have been posted to a main RAM node */
 	STARPU_ASSERT(starpu_node_get_kind(handling_node) != STARPU_DISK_RAM);
 	STARPU_ASSERT(handling_node == STARPU_MAIN_RAM || _starpu_memory_node_get_nworkers(handling_node));
@@ -396,7 +397,7 @@ static void starpu_handle_data_request_completion(struct _starpu_data_request *r
 		struct _starpu_data_request *next_req = r->next_req[chained_req];
 		STARPU_ASSERT(next_req->ndeps > 0);
 		next_req->ndeps--;
-		_starpu_post_data_request(next_req, next_req->handling_node);
+		_starpu_post_data_request(next_req);
 	}
 
 	r->completed = 1;

+ 2 - 2
src/datawizard/data_request.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2010, 2013-2016  Université de Bordeaux
+ * Copyright (C) 2009-2010, 2013-2017  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2013  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -120,7 +120,7 @@ LIST_TYPE(_starpu_data_requester,
 
 void _starpu_init_data_request_lists(void);
 void _starpu_deinit_data_request_lists(void);
-void _starpu_post_data_request(struct _starpu_data_request *r, unsigned handling_node);
+void _starpu_post_data_request(struct _starpu_data_request *r);
 /* returns 0 if we have pushed all requests, -EBUSY or -ENOMEM otherwise */
 int _starpu_handle_node_data_requests(unsigned src_node, unsigned may_alloc, unsigned *pushed);
 int _starpu_handle_node_prefetch_requests(unsigned src_node, unsigned may_alloc, unsigned *pushed);

+ 1 - 1
src/datawizard/user_interactions.c

@@ -39,7 +39,7 @@ int starpu_data_request_allocation(starpu_data_handle_t handle, unsigned node)
 	/* we do not increase the refcnt associated to the request since we are
 	 * not waiting for its termination */
 
-	_starpu_post_data_request(r, node);
+	_starpu_post_data_request(r);
 
 	_starpu_spin_unlock(&handle->header_lock);