|
@@ -173,6 +173,7 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
|
|
|
}
|
|
|
|
|
|
#ifndef STARPU_NON_BLOCKING_DRIVERS
|
|
|
+ /* XXX: shouldn't be needed, and doesn't work with chained requests anyway */
|
|
|
_starpu_wake_all_blocked_workers_on_node(r->handling_node);
|
|
|
#endif
|
|
|
|
|
@@ -429,18 +430,24 @@ int _starpu_handle_node_data_requests(unsigned src_node, unsigned may_alloc, uns
|
|
|
|
|
|
*pushed = 0;
|
|
|
|
|
|
+#ifndef STARPU_NON_BLOCKING_DRIVERS
|
|
|
/* This is racy, but not posing problems actually, since we know we
|
|
|
* will come back here to probe again regularly anyway.
|
|
|
* Thus, do not expose this optimization to helgrind */
|
|
|
if (!RUNNING_ON_VALGRIND && _starpu_data_request_list_empty(data_requests[src_node]))
|
|
|
return 0;
|
|
|
+#endif
|
|
|
|
|
|
empty_list = _starpu_data_request_list_new();
|
|
|
|
|
|
+#ifdef STARPU_NON_BLOCKING_DRIVERS
|
|
|
/* take all the entries from the request list */
|
|
|
if (STARPU_PTHREAD_MUTEX_TRYLOCK(&data_requests_list_mutex[src_node]))
|
|
|
/* List is busy, do not bother with it */
|
|
|
return -EBUSY;
|
|
|
+#else
|
|
|
+ STARPU_PTHREAD_MUTEX_LOCK(&data_requests_list_mutex[src_node]);
|
|
|
+#endif
|
|
|
|
|
|
struct _starpu_data_request_list *local_list = data_requests[src_node];
|
|
|
|
|
@@ -518,18 +525,24 @@ void _starpu_handle_node_prefetch_requests(unsigned src_node, unsigned may_alloc
|
|
|
|
|
|
*pushed = 0;
|
|
|
|
|
|
+#ifndef STARPU_NON_BLOCKING_DRIVERS
|
|
|
/* This is racy, but not posing problems actually, since we know we
|
|
|
* will come back here to probe again regularly anyway.
|
|
|
* Thus, do not expose this optimization to valgrind */
|
|
|
if (!RUNNING_ON_VALGRIND && _starpu_data_request_list_empty(prefetch_requests[src_node]))
|
|
|
return;
|
|
|
+#endif
|
|
|
|
|
|
empty_list = _starpu_data_request_list_new();
|
|
|
|
|
|
+#ifdef STARPU_NON_BLOCKING_DRIVERS
|
|
|
/* take all the entries from the request list */
|
|
|
if (STARPU_PTHREAD_MUTEX_TRYLOCK(&data_requests_list_mutex[src_node]))
|
|
|
/* List is busy, do not bother with it */
|
|
|
return;
|
|
|
+#else
|
|
|
+ STARPU_PTHREAD_MUTEX_LOCK(&data_requests_list_mutex[src_node]);
|
|
|
+#endif
|
|
|
|
|
|
struct _starpu_data_request_list *local_list = prefetch_requests[src_node];
|
|
|
|