Browse Source

component-fifo/prio: accept pushing back over the limit

An eager scheduler below a fifo/prio might be trying to push below and
fail, and be able to push back the task it took.
Samuel Thibault 4 years ago
parent
commit
80f9bf2ad6
2 changed files with 2 additions and 4 deletions
  1. 1 2
      src/sched_policies/component_fifo.c
  2. 1 2
      src/sched_policies/component_prio.c

+ 1 - 2
src/sched_policies/component_fifo.c

@@ -92,9 +92,8 @@ static int fifo_push_local_task(struct starpu_sched_component * component, struc
 	const double now = starpu_timing_now();
 	STARPU_COMPONENT_MUTEX_LOCK(mutex);
 
-	if (data->ntasks_threshold != 0 && queue->ntasks >= data->ntasks_threshold)
+	if (!is_pushback && data->ntasks_threshold != 0 && queue->ntasks >= data->ntasks_threshold)
 	{
-		STARPU_ASSERT(!is_pushback);
 		ret = 1;
 		STARPU_COMPONENT_MUTEX_UNLOCK(mutex);
 	}

+ 1 - 2
src/sched_policies/component_prio.c

@@ -114,9 +114,8 @@ static int prio_push_local_task(struct starpu_sched_component * component, struc
 
 	double exp_len = NAN;
 
-	if (data->ntasks_threshold != 0 && queue->ntasks >= data->ntasks_threshold)
+	if (!is_pushback && data->ntasks_threshold != 0 && queue->ntasks >= data->ntasks_threshold)
 	{
-		STARPU_ASSERT(!is_pushback);
 		ret = 1;
 		STARPU_COMPONENT_MUTEX_UNLOCK(mutex);
 	}