Explorar o código

Check that a replicate is not busy before writing it back

Samuel Thibault %!s(int64=10) %!d(string=hai) anos
pai
achega
8f29983c73
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/datawizard/memalloc.c

+ 2 - 3
src/datawizard/memalloc.c

@@ -994,9 +994,8 @@ void starpu_memchunk_tidy(unsigned node)
 				mc->clean = 1;
 				mc_clean_nb[node]++;
 			}
-			else
-			{
-				/* MC is dirty, submit writeback */
+			else if (handle->per_node[node].refcnt == 0) {
+				/* MC is dirty and nobody working on it, submit writeback */
 
 				/* MC will be clean, consider it as such */
 				mc->clean = 1;