[PATCH] cyclicdeadline: removed extra pthread_barrier_wait() calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux