Переглянути джерело

port r14751 from 1.1: Add barrier to make sure we synchronize caches even when the local node does not have any request (and thus we don't take any lock)

Samuel Thibault 10 роки тому
батько
коміт
a7168c467b
2 змінених файлів з 2 додано та 0 видалено
  1. 1 0
      src/datawizard/coherency.h
  2. 1 0
      src/datawizard/data_request.c

+ 1 - 0
src/datawizard/coherency.h

@@ -51,6 +51,7 @@ struct _starpu_data_replicate {
 	/* describes the state of the local data in term of coherency */
 	enum _starpu_cache_state	state;
 
+	/* How many requests or tasks are currently working with this replicate */
 	int refcnt;
 
 	/* A buffer that is used for SCRATCH or reduction cannnot be used with

+ 1 - 0
src/datawizard/data_request.c

@@ -179,6 +179,7 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 
 	do
 	{
+		STARPU_SYNCHRONIZE();
 		STARPU_HG_DISABLE_CHECKING(r->completed);
 		completed = r->completed;
 		STARPU_HG_ENABLE_CHECKING(r->completed);