From: Anubhav Shelat <ashelat@redhat.com>
To: jkacur@redhat.com
Cc: linux-rt-users@vger.kernel.org, kcarcia@redhat.com,
Anubhav Shelat <ashelat@redhat.com>
Subject: [PATCH] cyclicdeadline: removed extra pthread_barrier_wait() calls
Date: Mon, 7 Aug 2023 09:32:28 -0400 [thread overview]
Message-ID: <20230807133228.29873-1-ashelat@redhat.com> (raw)
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
reply other threads:[~2023-08-07 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230807133228.29873-1-ashelat@redhat.com \
--to=ashelat@redhat.com \
--cc=jkacur@redhat.com \
--cc=kcarcia@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).