summaryrefslogtreecommitdiffstats
path: root/meta/recipes-rt/rt-tests/files
diff options
context:
space:
mode:
authorJim Somerville <Jim.Somerville@windriver.com>2013-01-21 11:13:31 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-08 14:50:37 +0000
commit20d88ff7e241db443091223515cb2195e9ad7abd (patch)
tree0a32627fd24a44ab6ef8134911a45314813a7d29 /meta/recipes-rt/rt-tests/files
parent0ad5e6753796e050f2a9824d0516218896fe87e1 (diff)
downloadpoky-20d88ff7e241db443091223515cb2195e9ad7abd.tar.gz
rt-tests: fix cyclictest reported 1 sec latencies
[ CQID: WIND00391769 ] Huge latencies reported close to 1 second when certain options are used in cyclictest. Extend the original commit to remove the 1 second hardcoded timer values from the RELTIME and ITIMER options. Use the the actual interval instead. (From OE-Core rev: d1a3f3e2a6a74ba9b7ad5554648faebaf1b73c9f) Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-rt/rt-tests/files')
-rw-r--r--meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch b/meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch
new file mode 100644
index 0000000000..ea4f3cc176
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/files/cyclictest-finish-removal-of-1-second-first-loops.patch
@@ -0,0 +1,58 @@
1From 8959451a8ec5dc83dcb2dba6701abe8bf419e12c Mon Sep 17 00:00:00 2001
2Message-Id: <8959451a8ec5dc83dcb2dba6701abe8bf419e12c.1358783585.git.Jim.Somerville@windriver.com>
3From: Jim Somerville <Jim.Somerville@windriver.com>
4Date: Mon, 21 Jan 2013 10:50:18 -0500
5Subject: [PATCH 1/1] cyclictest: finish removal of 1 second first loops
6
7Observation:
8Huge latencies reported close to 1 second when certain options
9are used in cyclictest.
10
11Problem:
12[ commit da4956cbcaf7945554f30e4d3a9be09b1431b19a
13 use interval on first loop instead of 1 second ]
14removed the 1 second first timing loop out of the main path
15in cyclictest but left it in two other paths, namely the ones
16triggered by these two options:
17-r --relative use relative timer instead of absolute
18-s --system use sys_nanosleep and sys_setitimer
19This causes huge latencies of close to 1 second to be reported
20by cyclictest with certain uses of those two options.
21
22Fix:
23Extend the original commit to remove the 1 second hardcoded
24timer values from the RELTIME and ITIMER options. Use the
25the actual interval instead.
26
27Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
28---
29 src/cyclictest/cyclictest.c | 6 ++----
30 1 files changed, 2 insertions(+), 4 deletions(-)
31
32diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
33index 11b6cea..8487409 100644
34--- a/src/cyclictest/cyclictest.c
35+++ b/src/cyclictest/cyclictest.c
36@@ -741,17 +741,15 @@ void *timerthread(void *param)
37 if (par->timermode == TIMER_ABSTIME)
38 tspec.it_value = next;
39 else {
40- tspec.it_value.tv_nsec = 0;
41- tspec.it_value.tv_sec = 1;
42+ tspec.it_value = interval;
43 }
44 timer_settime(timer, par->timermode, &tspec, NULL);
45 }
46
47 if (par->mode == MODE_SYS_ITIMER) {
48- itimer.it_value.tv_sec = 1;
49- itimer.it_value.tv_usec = 0;
50 itimer.it_interval.tv_sec = interval.tv_sec;
51 itimer.it_interval.tv_usec = interval.tv_nsec / 1000;
52+ itimer.it_value = itimer.it_interval;
53 setitimer (ITIMER_REAL, &itimer, NULL);
54 }
55
56--
571.7.4.1
58