Skip to content

Make scheduler follow engine task steal policy

The scheduler currently implements task stealing by default:

scheduler_init(&e->sched, e->s, nr_tasks, nr_queues, scheduler_flag_steal,
               e->nodeID, &e->threadpool);

using the macro defined in scheduler.h:

#define scheduler_flag_steal 1

it should use the engine policy passed into engine_init from main.c instead.

Suggested changes:

engine_init()

scheduler_init(&e->sched, e->s, nr_tasks, nr_queues, (policy & scheduler_flag_steal),
               e->nodeID, &e->threadpool);

scheduler.h

#define scheduler_flag_steal (1 << 1)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information