浏览代码

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);