* [PATCH] cyclicdeadline: removed extra pthread_barrier_wait() calls
@ 2023-08-07 13:32 Anubhav Shelat
0 siblings, 0 replies; only message in thread
From: Anubhav Shelat @ 2023-08-07 13:32 UTC (permalink / raw)
To: jkacur; +Cc: linux-rt-users, kcarcia, Anubhav Shelat
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@redhat.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-07 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 13:32 [PATCH] cyclicdeadline: removed extra pthread_barrier_wait() calls Anubhav Shelat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).