Before this change, cyclicdeadline was giving abnormally high latencies, uncharacteristic of an RT system. After removing the extra calls, the latencies were more in line with what we expected. Signed-off-by: Anubhav Shelat <ashelat@xxxxxxxxxx> --- src/sched_deadline/cyclicdeadline.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c index 48b82e7efb01..39aeeb5d0785 100644 --- a/src/sched_deadline/cyclicdeadline.c +++ b/src/sched_deadline/cyclicdeadline.c @@ -807,8 +807,6 @@ void *run_deadline(void *data) return NULL; } - pthread_barrier_wait(&barrier); - attr.sched_policy = SCHED_DEADLINE; attr.sched_runtime = sd->runtime_us * 1000; attr.sched_deadline = sd->deadline_us * 1000; @@ -816,8 +814,6 @@ void *run_deadline(void *data) printf("thread[%d] runtime=%lldus deadline=%lldus\n", gettid(), sd->runtime_us, sd->deadline_us); - pthread_barrier_wait(&barrier); - ret = sched_setattr(0, &attr, 0); if (ret < 0) { err_msg_n(errno, "[%ld]", tid); @@ -1281,8 +1277,6 @@ int main(int argc, char **argv) atexit(teardown); - pthread_barrier_wait(&barrier); - if (shutdown) fatal("failed to setup child threads at step 1\n"); @@ -1312,8 +1306,6 @@ int main(int argc, char **argv) printf("main thread %d\n", gettid()); - pthread_barrier_wait(&barrier); - if (shutdown) fatal("failed to setup child threads at step 2"); -- 2.39.3