Browse Source

Advise to disable implicit data dependencies when appropriate

Samuel Thibault 13 years ago
parent
commit
13f221325c
2 changed files with 10 additions and 0 deletions
  1. 7 0
      doc/chapters/perf-optimization.texi
  2. 3 0
      src/core/dependencies/implicit_data_deps.c

+ 7 - 0
doc/chapters/perf-optimization.texi

@@ -68,6 +68,13 @@ Setting the write-through mask to @code{~0U} can also be useful to make sure all
 memory nodes always have a copy of the data, so that it is never evicted when
 memory gets scarse.
 
+Implicit data dependency computation can become expensive if a lot
+of tasks access the same piece of data. If no dependency is required
+on some piece of data (e.g. because it is only accessed in read-only
+mode, or because write accesses are actually commutative), use the
+@code{starpu_data_set_sequential_consistency_flag} function to disable implicit
+dependencies on that data.
+
 @node Task granularity
 @section Task granularity
 

+ 3 - 0
src/core/dependencies/implicit_data_deps.c

@@ -352,6 +352,9 @@ void _starpu_release_data_enforce_sequential_consistency(struct starpu_task *tas
 		struct _starpu_task_wrapper_list *l;
 		l = handle->last_submitted_readers;
 		struct _starpu_task_wrapper_list *prev = NULL;
+#ifdef STARPU_DEVEL
+#warning TODO: use double-linked list to make finding ourself fast
+#endif
 		while (l)
 		{
 			struct _starpu_task_wrapper_list *next = l->next;