|
@@ -93,13 +93,16 @@ void starpu_sched_component_initialize_simple_schedulers(unsigned sched_ctx_id,
|
|
(void) create_decision_component;
|
|
(void) create_decision_component;
|
|
(void) data;
|
|
(void) data;
|
|
|
|
|
|
|
|
+ int above_prio = starpu_get_env_number_default("STARPU_SCHED_SORTED_ABOVE", flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE_PRIO ? 1 : 0);
|
|
|
|
+ int below_prio = starpu_get_env_number_default("STARPU_SCHED_SORTED_BELOW", flags & STARPU_SCHED_SIMPLE_FIFOS_BELOW_PRIO ? 1 : 0);
|
|
|
|
+
|
|
/* Create combined workers if requested */
|
|
/* Create combined workers if requested */
|
|
if (flags & STARPU_SCHED_SIMPLE_COMBINED_WORKERS)
|
|
if (flags & STARPU_SCHED_SIMPLE_COMBINED_WORKERS)
|
|
starpu_sched_find_all_worker_combinations();
|
|
starpu_sched_find_all_worker_combinations();
|
|
|
|
|
|
/* Components parameters */
|
|
/* Components parameters */
|
|
|
|
|
|
- if (flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE_PRIO || flags & STARPU_SCHED_SIMPLE_FIFOS_BELOW_PRIO)
|
|
|
|
|
|
+ if (above_prio || below_prio)
|
|
{
|
|
{
|
|
/* The application may use any integer */
|
|
/* The application may use any integer */
|
|
if (starpu_sched_ctx_min_priority_is_set(sched_ctx_id) == 0)
|
|
if (starpu_sched_ctx_min_priority_is_set(sched_ctx_id) == 0)
|
|
@@ -188,6 +191,9 @@ void starpu_sched_component_initialize_simple_schedulers(unsigned sched_ctx_id,
|
|
void *data = va_arg(varg_list, void *);
|
|
void *data = va_arg(varg_list, void *);
|
|
flags = va_arg(varg_list, unsigned);
|
|
flags = va_arg(varg_list, unsigned);
|
|
|
|
|
|
|
|
+ int above_prio = starpu_get_env_number_default("STARPU_SCHED_SORTED_ABOVE", flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE_PRIO ? 1 : 0);
|
|
|
|
+ int below_prio = starpu_get_env_number_default("STARPU_SCHED_SORTED_BELOW", flags & STARPU_SCHED_SIMPLE_FIFOS_BELOW_PRIO ? 1 : 0);
|
|
|
|
+
|
|
if (nbelow == 1 && !(flags & STARPU_SCHED_SIMPLE_DECIDE_ALWAYS))
|
|
if (nbelow == 1 && !(flags & STARPU_SCHED_SIMPLE_DECIDE_ALWAYS))
|
|
{
|
|
{
|
|
/* Oh, no choice, we don't actually need to decide, just
|
|
/* Oh, no choice, we don't actually need to decide, just
|
|
@@ -206,7 +212,7 @@ void starpu_sched_component_initialize_simple_schedulers(unsigned sched_ctx_id,
|
|
if (flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE)
|
|
if (flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE)
|
|
{
|
|
{
|
|
struct starpu_sched_component *fifo_above;
|
|
struct starpu_sched_component *fifo_above;
|
|
- if (flags & STARPU_SCHED_SIMPLE_FIFO_ABOVE_PRIO)
|
|
|
|
|
|
+ if (above_prio)
|
|
{
|
|
{
|
|
fifo_above = starpu_sched_component_prio_create(t, NULL);
|
|
fifo_above = starpu_sched_component_prio_create(t, NULL);
|
|
}
|
|
}
|
|
@@ -309,7 +315,7 @@ void starpu_sched_component_initialize_simple_schedulers(unsigned sched_ctx_id,
|
|
&& i >= starpu_worker_get_count()))
|
|
&& i >= starpu_worker_get_count()))
|
|
{
|
|
{
|
|
struct starpu_sched_component *fifo_below;
|
|
struct starpu_sched_component *fifo_below;
|
|
- if (flags & STARPU_SCHED_SIMPLE_FIFOS_BELOW_PRIO)
|
|
|
|
|
|
+ if (below_prio)
|
|
{
|
|
{
|
|
fifo_below = starpu_sched_component_prio_create(t, &prio_data);
|
|
fifo_below = starpu_sched_component_prio_create(t, &prio_data);
|
|
}
|
|
}
|