Compare commits

...

8 Commits

Author SHA1 Message Date
5ed23a6542 Import from AlmaLinux stable repository 2024-05-31 18:07:13 +00:00
CentOS Sources
48c1b36a0c import rt-tests-2.5-1.el8 2023-05-16 08:03:17 +00:00
CentOS Sources
7c8728b6a9 import rt-tests-2.4-1.el8 2022-11-08 15:03:53 +00:00
CentOS Sources
a6c4cab801 import rt-tests-2.3-2.el8 2022-05-10 11:48:00 +00:00
CentOS Sources
f6ef7af664 import rt-tests-2.1-1.el8 2021-11-11 08:22:53 +00:00
CentOS Sources
cc4f093a57 import rt-tests-1.10-3.el8 2021-09-10 04:02:53 +00:00
CentOS Sources
df1f80b723 import rt-tests-1.8-11.el8 2021-09-10 04:02:50 +00:00
CentOS Sources
c16d28c054 import rt-tests-1.5-18.el8 2021-09-10 04:02:47 +00:00
35 changed files with 758 additions and 2882 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/rt-tests-1.3.tar.gz
SOURCES/rt-tests-2.6.tar.xz

View File

@ -1 +0,0 @@
0df302aeb536bbc4fc64922815bbd2426efb3184 SOURCES/rt-tests-1.3.tar.gz

View File

@ -1,83 +0,0 @@
From f234e04e76e24d497754876f5e7c896dc9693f3e Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Tue, 4 Sep 2018 08:56:35 -0300
Subject: [PATCH 2/2] Add queuelat manpage
Add a man page for queuelat, with a short introduction
and description for each option.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/queuelat/queuelat.8 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 src/queuelat/queuelat.8
diff --git a/src/queuelat/queuelat.8 b/src/queuelat/queuelat.8
new file mode 100644
index 000000000000..d68beb98bff7
--- /dev/null
+++ b/src/queuelat/queuelat.8
@@ -0,0 +1,59 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH QUEUELAT 8 "Sept 3, 2018"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+queuelat \- Queue latency test program
+.SH SYNOPSIS
+.B queuelat
+.RI "[\-h] [\-m " max-queue-len "] [\-c " cycles-per-packet "] [\-p " mpps "] [\-f " tsc-freq "] [\-t " timeout "] \
+
+.SH DESCRIPTION
+queuelat simulates a network queue checking for latency
+violations in packet processing.
+
+.SH OPTIONS
+A summary of options is included below.
+.TP
+.B \-h
+Show help
+.br
+.TP
+.B \-m max-queue-len
+Maximum allowed latency, in nanoseconds. If latency to process
+.br
+any packet exceeds this value, the program quits,
+writing
+.br
+a message to the trace buffer.
+.TP
+.B \-c cycles-per-packet
+Estimated number of cycles it takes to process one packet.
+.br
+This value should come from the envisioned packet
+.br
+forwarding application being simulated.
+.TP
+.B \-p mpps
+Million packets per second that arrive for processing.
+.TP
+.B \-f tsc-freq-mhz
+TSC frequency in MHz.
+.TP
+.B \-t timeout
+Timeout in seconds to quit the program.
+
+
+.SH AUTHOR
+queuelat was written by Marcelo Tosatti <mtosatti@redhat.com>
+.br
--
2.14.4

View File

@ -1,373 +0,0 @@
From 88b17cb724c653391a92be00b48378432a1036a5 Mon Sep 17 00:00:00 2001
From: Joe Korty <joe.korty@concurrent-rt.com>
Date: Mon, 14 Jan 2019 17:29:26 +0100
Subject: [PATCH 1/5] Add ssdd test to the rt-tests suite
The following program might make a good addition to the rt
test suite. It tests the reliability of PTRACE_SINGLESTEP.
It does by default 10,000 ssteps against a simple,
spinner tracee. Also by default, it spins off ten of these
tracer/tracee pairs, all of which are to run concurrently.
Starting with 4.13-rt, this test occasionally encounters a
sstep whose waitpid returns a WIFSIGNALED (signal SIGTRAP)
rather than a WIFSTOPPED. This usually happens after
thousands of ssteps have executed. Having multiple
tracer/tracee pairs running dramatically increases the
chances of failure.
The is what the test output looks like for a good run:
forktest#0/22872: STARTING
forktest#7/22879: STARTING
forktest#8/22880: STARTING
forktest#6/22878: STARTING
forktest#5/22877: STARTING
forktest#3/22875: STARTING
forktest#4/22876: STARTING
forktest#9/22882: STARTING
forktest#2/22874: STARTING
forktest#1/22873: STARTING
forktest#0/22872: EXITING, no error
forktest#8/22880: EXITING, no error
forktest#3/22875: EXITING, no error
forktest#7/22879: EXITING, no error
forktest#6/22878: EXITING, no error
forktest#5/22877: EXITING, no error
forktest#2/22874: EXITING, no error
forktest#4/22876: EXITING, no error
forktest#9/22882: EXITING, no error
forktest#1/22873: EXITING, no error
All tests PASSED.
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ssdd/ssdd.c | 315 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 315 insertions(+)
create mode 100644 src/ssdd/ssdd.c
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
new file mode 100644
index 000000000000..6d09d54e34e1
--- /dev/null
+++ b/src/ssdd/ssdd.c
@@ -0,0 +1,315 @@
+/*
+ * Have a tracer do a bunch of PTRACE_SINGLESTEPs against
+ * a tracee as fast as possible. Create several of these
+ * tracer/tracee pairs and see if they can be made to
+ * interfere with each other.
+ *
+ * Usage:
+ * ssdd nforks niters
+ * Where:
+ * nforks - number of tracer/tracee pairs to fork off.
+ * default 10.
+ * niters - number of PTRACE_SINGLESTEP iterations to
+ * do before declaring success, for each tracer/
+ * tracee pair set up. Default 10,000.
+ *
+ * The tracer waits on each PTRACE_SINGLESTEP with a waitpid(2)
+ * and checks that waitpid's return values for correctness.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/ptrace.h>
+
+/* do_wait return values */
+#define STATE_EXITED 1
+#define STATE_STOPPED 2
+#define STATE_SIGNALED 3
+#define STATE_UNKNOWN 4
+#define STATE_ECHILD 5
+#define STATE_EXITED_TSIG 6 /* exited with termination signal */
+#define STATE_EXITED_ERRSTAT 7 /* exited with non-zero status */
+
+char *state_name[] = {
+ [STATE_EXITED] = "STATE_EXITED",
+ [STATE_STOPPED] = "STATE_STOPPED",
+ [STATE_SIGNALED] = "STATE_SIGNALED",
+ [STATE_UNKNOWN] = "STATE_UNKNOWN",
+ [STATE_ECHILD] = "STATE_ECHILD",
+ [STATE_EXITED_TSIG] = "STATE_EXITED_TSIG",
+ [STATE_EXITED_ERRSTAT] = "STATE_EXITED_ERRSTAT"
+};
+
+const char *get_state_name(int state)
+{
+ if (state < STATE_EXITED || state > STATE_EXITED_ERRSTAT)
+ return "?";
+ return state_name[state];
+}
+
+#define unused __attribute__((unused))
+
+static int got_sigchld;
+
+static int do_wait(pid_t *wait_pid, int *ret_sig)
+{
+ int status, child_status;
+
+ *ret_sig = -1; /* initially mark 'nothing returned' */
+
+ while (1) {
+ status = waitpid(-1, &child_status, WUNTRACED | __WALL);
+ if (status == -1) {
+ if (errno == EINTR)
+ continue;
+ if (errno == ECHILD) {
+ *wait_pid = (pid_t)0;
+ return STATE_ECHILD;
+ }
+ printf("do_wait/%d: EXITING, ERROR: "
+ "waitpid() returned errno %d\n",
+ getpid(), errno);
+ exit(1);
+ }
+ break;
+ }
+ *wait_pid = (pid_t)status;
+
+ if (WIFEXITED(child_status)) {
+ if (WIFSIGNALED(child_status))
+ return STATE_EXITED_TSIG;
+ if (WEXITSTATUS(child_status))
+ return STATE_EXITED_ERRSTAT;
+ return STATE_EXITED;
+ }
+ if (WIFSTOPPED(child_status)) {
+ *ret_sig = WSTOPSIG(child_status);
+ return STATE_STOPPED;
+ }
+ if (WIFSIGNALED(child_status)) {
+ *ret_sig = WTERMSIG(child_status);
+ return STATE_SIGNALED;
+ }
+ return STATE_UNKNOWN;
+}
+
+int check_sigchld(void)
+{
+ int i;
+ /*
+ * The signal is asynchronous so give it some
+ * time to arrive.
+ */
+ for (i = 0; i < 10 && !got_sigchld; i++)
+ usleep(1000); /* 10 msecs */
+ for (i = 0; i < 10 && !got_sigchld; i++)
+ usleep(2000); /* 20 + 10 = 30 msecs */
+ for (i = 0; i < 10 && !got_sigchld; i++)
+ usleep(4000); /* 40 + 30 = 70 msecs */
+ for (i = 0; i < 10 && !got_sigchld; i++)
+ usleep(8000); /* 80 + 70 = 150 msecs */
+ for (i = 0; i < 10 && !got_sigchld; i++)
+ usleep(16000); /* 160 + 150 = 310 msecs */
+
+ return got_sigchld;
+}
+
+pid_t parent;
+int nforks = 10;
+int nsteps = 10000;
+
+static void sigchld(int sig, unused siginfo_t * info, unused void *arg)
+{
+ got_sigchld = 1;
+}
+
+static void child_process(void)
+{
+ unused volatile int i;
+
+ /* wait for ptrace attach */
+ usleep(100000);
+ while (1)
+ i = 0;
+}
+
+static int forktests(int testid)
+{
+ int i, status, ret_sig;
+ long pstatus;
+ pid_t child, wait_pid;
+ struct sigaction act, oact;
+
+ parent = getpid();
+ printf("forktest#%d/%d: STARTING\n", testid, parent);
+
+ child = fork();
+ if (child == -1) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "fork returned errno %d\n", testid, parent, errno);
+ exit(1);
+ }
+ if (!child)
+ child_process();
+
+ act.sa_sigaction = sigchld;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = SA_SIGINFO;
+ status = sigaction(SIGCHLD, &act, &oact);
+ if (status) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "sigaction returned %d, errno %d\n",
+ testid, parent, status, errno);
+ exit(1);
+ }
+
+ /* give both our child and parent time to set things up */
+ usleep(125000);
+
+ /*
+ * Attach to the child.
+ */
+ pstatus = ptrace(PTRACE_ATTACH, child, NULL, NULL);
+ if (pstatus == ~0l) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "attach failed. errno %d\n",
+ testid, getpid(), errno);
+ exit(1);
+ }
+
+ /*
+ * The attach should cause the child to receive a signal.
+ */
+ status = do_wait(&wait_pid, &ret_sig);
+ if (wait_pid != child) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "attach: Unexpected wait pid %d\n",
+ testid, getpid(), wait_pid);
+ exit(1);
+ }
+ if (status != STATE_STOPPED) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "attach: wait on PTRACE_ATTACH returned %d "
+ "[%s, wanted STATE_STOPPED], signo %d\n",
+ testid, getpid(), status, get_state_name(status),
+ ret_sig);
+ exit(1);
+ }
+ else if (!check_sigchld()) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "wait on PTRACE_ATTACH saw a SIGCHLD count of %d, should be 1\n",
+ testid, getpid(), got_sigchld);
+ exit(1);
+ }
+ got_sigchld = 0;
+
+
+ /*
+ * Generate 'nsteps' PTRACE_SINGLESTEPs, make sure they all actually
+ * step the tracee.
+ */
+ for (i = 0; i < nsteps; i++) {
+ pstatus = ptrace(PTRACE_SINGLESTEP, child, NULL, NULL);
+
+ if (pstatus) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "PTRACE_SINGLESTEP #%d: returned status %ld, "
+ "errno %d, signo %d\n",
+ testid, getpid(), i, pstatus, errno, ret_sig);
+ exit(1);
+ }
+
+ status = do_wait(&wait_pid, &ret_sig);
+ if (wait_pid != child) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "wait on PTRACE_SINGLESTEP #%d: returned wrong pid %d, "
+ "expected %d\n",
+ testid, getpid(), i, wait_pid, child);
+ exit(1);
+ }
+ if (status != STATE_STOPPED) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "wait on PTRACE_SINGLESTEP #%d: wanted STATE_STOPPED, "
+ "saw %s instead (and saw signo %d too)\n",
+ testid, getpid(), i,
+ get_state_name(status), ret_sig);
+ exit(1);
+ }
+ if (ret_sig != SIGTRAP) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "wait on PTRACE_SINGLESTEP #%d: returned signal %d, "
+ "wanted SIGTRAP\n",
+ testid, getpid(), i, ret_sig);
+ exit(1);
+ }
+ if (!check_sigchld()) {
+ printf("forktest#%d/%d: EXITING, ERROR: "
+ "wait on PTRACE_SINGLESTEP #%d: no SIGCHLD seen "
+ "(signal count == 0), signo %d\n",
+ testid, getpid(), i, ret_sig);
+ exit(1);
+ }
+ got_sigchld = 0;
+ }
+
+ /* There is no need for the tracer to kill the tracee. It will
+ * automatically exit when its owner, ie, us, exits.
+ */
+
+ printf("forktest#%d/%d: EXITING, no error\n", testid, parent);
+ exit(0);
+}
+
+int main(int argc, char **argv)
+{
+ int i, ret_sig, status;
+ pid_t child = 0, wait_pid;
+ int error = 0;
+
+ setbuf(stdout, NULL);
+
+ argc--, argv++;
+ if (argc) {
+ nforks = atoi(*argv);
+ argc--, argv++;
+ if (argc)
+ nsteps = atoi(*argv);
+ }
+ printf("#forks: %d\n", nforks);
+ printf("#steps: %d\n", nsteps);
+ printf("\n");
+
+ for (i = 0; i < nforks; i++) {
+ child = fork();
+ if (child == -1) {
+ printf("main: fork returned errno %d\n", errno);
+ exit(1);
+ }
+ if (!child)
+ forktests(i);
+ }
+
+ for (i = 0; i < nforks; i++) {
+ status = do_wait(&wait_pid, &ret_sig);
+ if (status != STATE_EXITED) {
+ if (0) printf("main/%d: ERROR: "
+ "forktest#%d unexpected do_wait status %d "
+ "[%s, wanted STATE_EXITED]\n",
+ getpid(), wait_pid, status,
+ get_state_name(status));
+ error = 1;
+ }
+ }
+
+ printf("%s.\n", error ?
+ "One or more tests FAILED" :
+ "All tests PASSED");
+ exit(error);
+}
--
2.20.1

View File

@ -1,93 +0,0 @@
From be3ef7f9d228c3753ba805a9d25ee4dd26171d67 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 19 Jun 2018 01:38:48 +0200
Subject: [PATCH] Remove --numa option
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 30 ++++++++++++++----------------
src/cyclictest/rt_numa.h | 6 ------
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 1dce8fc2bb64..484ea7fa3130 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1207,7 +1207,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
{"spike-nodes", required_argument, NULL, OPT_TRIGGER_NODES },
{"threads", optional_argument, NULL, OPT_THREADS },
{"unbuffered", no_argument, NULL, OPT_UNBUFFERED },
- {"numa", no_argument, NULL, OPT_NUMA },
{"verbose", no_argument, NULL, OPT_VERBOSE },
{"dbg_cyclictest", no_argument, NULL, OPT_DBGCYCLIC },
{"policy", required_argument, NULL, OPT_POLICY },
@@ -1215,7 +1214,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
{"posix_timers", no_argument, NULL, OPT_POSIX_TIMERS },
{NULL, 0, NULL, 0 },
};
- int c = getopt_long(argc, argv, "a::A::b:c:d:D:h:H:i:l:MNo:p:mqrRsSt::uUvD:x",
+ int c = getopt_long(argc, argv, "a::A::b:c:d:D:h:H:i:l:MNo:p:mqrRsSt::uvD:x",
long_options, &option_index);
if (c == -1)
break;
@@ -1350,20 +1349,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'u':
case OPT_UNBUFFERED:
setvbuf(stdout, NULL, _IONBF, 0); break;
- case 'U':
- case OPT_NUMA: /* NUMA testing */
- numa = 1; /* Turn numa on */
- if (smp)
- fatal("numa and smp options are mutually exclusive\n");
- numa_on_and_available();
-#ifdef NUMA
- num_threads = max_cpus;
- setaffinity = AFFINITY_USEALL;
-#else
- warn("cyclictest was not built with the numa option\n");
- warn("ignoring --numa or -U\n");
-#endif
- break;
case 'v':
case OPT_VERBOSE: verbose = 1; break;
case 'x':
@@ -1399,6 +1384,19 @@ static void process_options (int argc, char *argv[], int max_cpus)
}
}
+ if (!smp) { /* if smp wasn't requested, test for numa automatically */
+#ifdef NUMA
+ if (numa_available() != -1) {
+ numa = 1;
+ num_threads = max_cpus;
+ setaffinity = AFFINITY_USEALL;
+#else
+ warn("cyclictest was not built with the numa option\n");
+ numa = 0;
+#endif
+ }
+ }
+
if (option_affinity) {
if (smp) {
warn("-a ignored due to --smp\n");
diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h
index ec2994314e80..3970e681fe7b 100644
--- a/src/cyclictest/rt_numa.h
+++ b/src/cyclictest/rt_numa.h
@@ -192,12 +192,6 @@ static inline void rt_bitmask_free(struct bitmask *mask)
#endif /* LIBNUMA_API_VERSION */
-static void numa_on_and_available()
-{
- if (numa && (numa_available() == -1))
- fatal("--numa specified and numa functions not available.\n");
-}
-
#else /* ! NUMA */
struct bitmask {
--
2.14.4

View File

@ -1,72 +0,0 @@
From 05a1ceb9b490b2cb0aff2f10c4753849df05dec0 Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Tue, 4 Sep 2018 08:56:34 -0300
Subject: [PATCH 1/2] add -h option to queuelat
Add -h (help) option to queuelat, which lists all
options.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/queuelat/README | 1 +
src/queuelat/queuelat.c | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/queuelat/README b/src/queuelat/README
index 790de3e13c17..4ffdb3753bbd 100644
--- a/src/queuelat/README
+++ b/src/queuelat/README
@@ -51,6 +51,7 @@ cycles_per_packet: number of cycles to process one packet (int).
mpps(million-packet-per-sec): million packets per second (float).
tsc_freq_mhz: TSC frequency in MHz, as measured by TSC PIT calibration
(search for "Detected XXX MHz processor" in dmesg, and use the integer part).
+timeout: timeout (in seconds).
How it works
============
diff --git a/src/queuelat/queuelat.c b/src/queuelat/queuelat.c
index 8bfed274ccab..2230d04bf391 100644
--- a/src/queuelat/queuelat.c
+++ b/src/queuelat/queuelat.c
@@ -532,6 +532,18 @@ int calculate_nr_packets_drain_per_block(void)
return nr_packets_drain_per_block;
}
+
+void print_help(void)
+{
+ printf("usage: queuelat [options]\n");
+ printf("-h show this help menu\n");
+ printf("-m max-queue-len (maximum latency allowed, in nanoseconds) (int)\n");
+ printf("-c cycles-per-packet (number of cycles to process one packet (int)\n");
+ printf("-p million-packet-per-sec (million packets per second) (float)\n");
+ printf("-f tsc-freq-mhz (TSC frequency in MHz) (float)\n");
+ printf("-t timeout (timeout, in seconds) (int)\n");
+}
+
int main(int argc, char **argv)
{
double tsc_freq_mhz;
@@ -549,7 +561,7 @@ int main(int argc, char **argv)
opterr = 0;
- while ((c = getopt (argc, argv, "m:c:p:f:t:q:")) != -1)
+ while ((c = getopt (argc, argv, "m:c:p:f:t:q:h")) != -1)
switch (c)
{
case 'm':
@@ -570,6 +582,9 @@ int main(int argc, char **argv)
case 'q':
qvalue = optarg;
break;
+ case 'h':
+ print_help();
+ return 0;
case '?':
if (optopt == 'm' || optopt == 'c' || optopt == 'p' ||
optopt == 'f' || optopt == 't' || optopt == 'q')
--
2.14.4

View File

@ -1,41 +0,0 @@
From 2b126beda6e76f89fb95c14bc421bc13a376cf2e Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com>
Date: Tue, 19 Feb 2019 16:10:38 +0100
Subject: [PATCH] cyclictest: Fix compiler warning about srncpy output
truncated
Fix compiler warning about strncpy output truncated before terminating
nul copying as many bytes from a string as its length
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Extracted from a patch from Clark
---
src/cyclictest/cyclictest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 68b3836405c1..1bd63fd93dce 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1257,7 +1257,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'F':
case OPT_FIFO:
use_fifo = 1;
- strncpy(fifopath, optarg, strlen(optarg));
+ strncpy(fifopath, optarg, strnlen(optarg, MAX_PATH-1));
break;
case 'H':
case OPT_HISTOFALL:
@@ -1267,7 +1267,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
histogram = atoi(optarg); break;
case OPT_HISTFILE:
use_histfile = 1;
- strncpy(histfile, optarg, strlen(optarg));
+ strncpy(histfile, optarg, strnlen(optarg, MAX_PATH-1));
break;
case 'i':
case OPT_INTERVAL:
--
2.20.1

View File

@ -1,56 +0,0 @@
From 966b4eeda61b4c623a5ef423236dc710b31c1532 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 20 Feb 2019 23:16:34 +0100
Subject: [PATCH] cyclictest: Make sure affinity is respected when numa is
detected
Make sure affinity is respected when numa is automatically detected and
when smp is not specified. Don't break the way smp currently works.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 1bd63fd93dce..ed59edefbf97 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1218,7 +1218,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'a':
case OPT_AFFINITY:
option_affinity = 1;
- if (smp || numa)
+ if (smp)
break;
if (optarg != NULL) {
parse_cpumask(optarg, max_cpus);
@@ -1384,8 +1384,10 @@ static void process_options (int argc, char *argv[], int max_cpus)
#ifdef NUMA
if (numa_available() != -1) {
numa = 1;
- num_threads = max_cpus;
- setaffinity = AFFINITY_USEALL;
+ if (setaffinity == AFFINITY_UNSPECIFIED) {
+ num_threads = max_cpus;
+ setaffinity = AFFINITY_USEALL;
+ }
}
#else
warn("cyclictest was not built with the numa option\n");
@@ -1394,11 +1396,8 @@ static void process_options (int argc, char *argv[], int max_cpus)
}
if (option_affinity) {
- if (smp) {
+ if (smp)
warn("-a ignored due to smp mode\n");
- } else if (numa) {
- warn("-a ignored due to numa mode\n");
- }
}
if (smi) {
--
2.20.1

View File

@ -1,44 +0,0 @@
From e1fa2cda6a6cc2e5eb916638e0325b3d334adbe4 Mon Sep 17 00:00:00 2001
From: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Date: Thu, 10 Jan 2019 10:21:59 +0800
Subject: [PATCH] cyclictest: fix_with_expected_identifier_in_latest
An error occurred during the build process:
src/cyclictest/cyclictest.c:1396:2: error: expected identifier or '(' before 'if'
if (option_affinity) {
The expected identifier "}" for "if (option_affinity){" occurs in another place.
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Signed-off-by: Zhong Lu <zhongl.fnst@cn.fujitsu.com>
- Fixed the indentation of the bracket
- Fixed the indentation of the block where NUMA is not defined
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 188a202c5171..68b3836405c1 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1386,11 +1386,11 @@ static void process_options (int argc, char *argv[], int max_cpus)
numa = 1;
num_threads = max_cpus;
setaffinity = AFFINITY_USEALL;
+ }
#else
- warn("cyclictest was not built with the numa option\n");
- numa = 0;
+ warn("cyclictest was not built with the numa option\n");
+ numa = 0;
#endif
- }
}
if (option_affinity) {
--
2.20.1

View File

@ -1,881 +0,0 @@
From f5ccfbe4d6641e48f56152be135d901dd31cba7e Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com>
Date: Tue, 16 Jan 2018 15:37:17 -0600
Subject: [PATCH 1/3] cyclictest: remove ftrace code
Remove all the code that manipulates tracing values with the exception
of the breaktrace logic. Cyclictest now presumes that any tracing
will be done by the trace-cmd command and will only *stop* tracing
if the breaktrace value is hit.
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 26838f86d54e3ff74223165cbbcc2d211becdaf2)
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 537 +++-----------------------------------------
1 file changed, 32 insertions(+), 505 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 8d9ec80fc239..1dce8fc2bb64 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -118,23 +118,8 @@ extern int clock_nanosleep(clockid_t __clock_id, int __flags,
#define MSR_SMI_COUNT 0x00000034
#define MSR_SMI_COUNT_MASK 0xFFFFFFFF
-int enable_events;
-
static char *policyname(int policy);
-enum {
- NOTRACE,
- CTXTSWITCH,
- IRQSOFF,
- PREEMPTOFF,
- PREEMPTIRQSOFF,
- WAKEUP,
- WAKEUPRT,
- LATENCY,
- FUNCTION,
- CUSTOM,
-};
-
/* Struct to transfer parameters to the thread */
struct thread_param {
int prio;
@@ -201,14 +186,9 @@ static void trigger_update(struct thread_param *par, int diff, int64_t ts);
static int shutdown;
static int tracelimit = 0;
-static int notrace = 0;
-static int trace_marker = 0;
-static int ftrace = 0;
-static int kernelversion;
static int verbose = 0;
static int oscope_reduction = 1;
static int lockall = 0;
-static int tracetype = NOTRACE;
static int histogram = 0;
static int histofall = 0;
static int duration = 0;
@@ -243,20 +223,10 @@ static pthread_barrier_t align_barr;
static pthread_barrier_t globalt_barr;
static struct timespec globalt;
-/* Backup of kernel variables that we modify */
-static struct kvars {
- char name[KVARNAMELEN];
- char value[KVALUELEN];
-} kv[KVARS];
-
static char *procfileprefix = "/proc/sys/kernel/";
static char *fileprefix;
-static char tracer[MAX_PATH];
static char fifopath[MAX_PATH];
static char histfile[MAX_PATH];
-static char **traceptr;
-static int traceopt_count;
-static int traceopt_size;
static struct thread_param **parameters;
static struct thread_stat **statistics;
@@ -311,101 +281,14 @@ static void set_latency_target(void)
}
-enum kernelversion {
- KV_NOT_SUPPORTED,
- KV_26_LT18,
- KV_26_LT24,
- KV_26_33,
- KV_30
-};
-
enum {
ERROR_GENERAL = -1,
ERROR_NOTFOUND = -2,
};
-static char functiontracer[MAX_PATH];
-static char traceroptions[MAX_PATH];
-
static int trace_fd = -1;
static int tracemark_fd = -1;
-static int kernvar(int mode, const char *name, char *value, size_t sizeofvalue)
-{
- char filename[128];
- int retval = 1;
- int path;
- size_t len_prefix = strlen(fileprefix), len_name = strlen(name);
-
- if (len_prefix + len_name + 1 > sizeof(filename)) {
- errno = ENOMEM;
- return 1;
- }
-
- memcpy(filename, fileprefix, len_prefix);
- memcpy(filename + len_prefix, name, len_name + 1);
-
- path = open(filename, mode);
- if (path >= 0) {
- if (mode == O_RDONLY) {
- int got;
- if ((got = read(path, value, sizeofvalue)) > 0) {
- retval = 0;
- value[got-1] = '\0';
- }
- } else if (mode == O_WRONLY) {
- if (write(path, value, sizeofvalue) == sizeofvalue)
- retval = 0;
- }
- close(path);
- }
- return retval;
-}
-
-static void setkernvar(const char *name, char *value)
-{
- int i;
- char oldvalue[KVALUELEN];
-
- if (kernelversion < KV_26_33) {
- if (kernvar(O_RDONLY, name, oldvalue, sizeof(oldvalue)))
- fprintf(stderr, "could not retrieve %s\n", name);
- else {
- for (i = 0; i < KVARS; i++) {
- if (!strcmp(kv[i].name, name))
- break;
- if (kv[i].name[0] == '\0') {
- strncpy(kv[i].name, name,
- sizeof(kv[i].name));
- strncpy(kv[i].value, oldvalue,
- sizeof(kv[i].value));
- break;
- }
- }
- if (i == KVARS)
- fprintf(stderr, "could not backup %s (%s)\n",
- name, oldvalue);
- }
- }
- if (kernvar(O_WRONLY, name, value, strlen(value)))
- fprintf(stderr, "could not set %s to %s\n", name, value);
-
-}
-
-static void restorekernvars(void)
-{
- int i;
-
- for (i = 0; i < KVARS; i++) {
- if (kv[i].name[0] != '\0') {
- if (kernvar(O_WRONLY, kv[i].name, kv[i].value,
- strlen(kv[i].value)))
- fprintf(stderr, "could not restore %s to %s\n",
- kv[i].name, kv[i].value);
- }
- }
-}
-
static inline void tsnorm(struct timespec *ts)
{
while (ts->tv_nsec >= NSEC_PER_SEC) {
@@ -422,8 +305,7 @@ static inline int tsgreater(struct timespec *a, struct timespec *b)
static inline int64_t calcdiff(struct timespec t1, struct timespec t2)
{
- int64_t diff;
- diff = USEC_PER_SEC * (long long)((int) t1.tv_sec - (int) t2.tv_sec);
+ int64_t diff = USEC_PER_SEC * (long long)((int) t1.tv_sec - (int) t2.tv_sec);
diff += ((int) t1.tv_nsec - (int) t2.tv_nsec) / 1000;
return diff;
}
@@ -444,32 +326,13 @@ static inline int64_t calctime(struct timespec t)
return time;
}
-static void traceopt(char *option)
-{
- char *ptr;
- if (traceopt_count + 1 > traceopt_size) {
- traceopt_size += 16;
- printf("expanding traceopt buffer to %d entries\n", traceopt_size);
- traceptr = realloc(traceptr, sizeof(char*) * traceopt_size);
- if (traceptr == NULL)
- fatal ("Error allocating space for %d trace options\n",
- traceopt_count+1);
- }
- ptr = malloc(strlen(option)+1);
- if (ptr == NULL)
- fatal("error allocating space for trace option %s\n", option);
- printf("adding traceopt %s\n", option);
- strcpy(ptr, option);
- traceptr[traceopt_count++] = ptr;
-}
-
static int trace_file_exists(char *name)
{
- struct stat sbuf;
- char *tracing_prefix = get_debugfileprefix();
- char path[MAX_PATH];
- strcat(strcpy(path, tracing_prefix), name);
- return stat(path, &sbuf) ? 0 : 1;
+ struct stat sbuf;
+ char *tracing_prefix = get_debugfileprefix();
+ char path[MAX_PATH];
+ strcat(strcpy(path, tracing_prefix), name);
+ return stat(path, &sbuf) ? 0 : 1;
}
#define TRACEBUFSIZ 1024
@@ -483,7 +346,7 @@ static void tracemark(char *fmt, ...)
/* bail out if we're not tracing */
/* or if the kernel doesn't support trace_mark */
- if (tracemark_fd < 0)
+ if (tracemark_fd < 0 || trace_fd < 0)
return;
va_start(ap, fmt);
@@ -497,45 +360,6 @@ static void tracemark(char *fmt, ...)
write(trace_fd, "0\n", 2);
}
-
-
-static void tracing(int on)
-{
- if (notrace)
- return;
-
- if (on) {
- switch (kernelversion) {
- case KV_26_LT18: gettimeofday(0,(struct timezone *)1); break;
- case KV_26_LT24: prctl(0, 1); break;
- case KV_26_33:
- case KV_30:
- write(trace_fd, "1", 1);
- break;
- default: break;
- }
- } else {
- switch (kernelversion) {
- case KV_26_LT18: gettimeofday(0,0); break;
- case KV_26_LT24: prctl(0, 0); break;
- case KV_26_33:
- case KV_30:
- write(trace_fd, "0", 1);
- break;
- default: break;
- }
- }
-}
-
-static int settracer(char *tracer)
-{
- if (valid_tracer(tracer)) {
- setkernvar("current_tracer", tracer);
- return 0;
- }
- return -1;
-}
-
static void open_tracemark_fd(void)
{
char path[MAX_PATH];
@@ -557,7 +381,7 @@ static void open_tracemark_fd(void)
* open the tracing_on file so that we can stop the trace
* if we hit a breaktrace threshold
*/
- if (notrace && trace_fd < 0) {
+ if (trace_fd < 0) {
sprintf(path, "%s/%s", fileprefix, "tracing_on");
if ((trace_fd = open(path, O_WRONLY)) < 0)
warn("unable to open tracing_on file: %s\n", path);
@@ -569,166 +393,19 @@ static void debugfs_prepare(void)
if (mount_debugfs(NULL))
fatal("could not mount debugfs");
- if (kernelversion >= KV_26_33) {
- char testname[MAX_PATH];
-
- fileprefix = get_debugfileprefix();
- if (!trace_file_exists("tracing_enabled") &&
- !trace_file_exists("tracing_on"))
- warn("tracing_enabled or tracing_on not found\n"
- "debug fs not mounted, "
- "TRACERs not configured?\n", testname);
- } else
- fileprefix = procfileprefix;
+ fileprefix = get_debugfileprefix();
+ if (!trace_file_exists("tracing_enabled") &&
+ !trace_file_exists("tracing_on"))
+ warn("tracing_enabled or tracing_on not found\n"
+ "debug fs not mounted");
}
static void enable_trace_mark(void)
{
- if (!trace_marker)
- return;
-
- if (!tracelimit)
- fatal("--tracemark requires -b\n");
-
debugfs_prepare();
open_tracemark_fd();
}
-static void setup_tracer(void)
-{
- if (!tracelimit || notrace)
- return;
-
- debugfs_prepare();
-
- if (kernelversion >= KV_26_33) {
- int ret;
-
- if (trace_file_exists("tracing_enabled") &&
- !trace_file_exists("tracing_on"))
- setkernvar("tracing_enabled", "1");
-
- /* ftrace_enabled is a sysctl variable */
- /* turn it on if you're doing anything but nop or event tracing */
-
- fileprefix = procfileprefix;
- if (tracetype)
- setkernvar("ftrace_enabled", "1");
- else
- setkernvar("ftrace_enabled", "0");
- fileprefix = get_debugfileprefix();
-
- /*
- * Set default tracer to nop.
- * this also has the nice side effect of clearing out
- * old traces.
- */
- ret = settracer("nop");
-
- switch (tracetype) {
- case NOTRACE:
- /* no tracer specified, use events */
- enable_events = 1;
- break;
- case FUNCTION:
- ret = settracer("function");
- break;
- case IRQSOFF:
- ret = settracer("irqsoff");
- break;
- case PREEMPTOFF:
- ret = settracer("preemptoff");
- break;
- case PREEMPTIRQSOFF:
- ret = settracer("preemptirqsoff");
- break;
- case CTXTSWITCH:
- if (valid_tracer("sched_switch"))
- ret = settracer("sched_switch");
- else {
- if ((ret = event_enable("sched/sched_wakeup")))
- break;
- ret = event_enable("sched/sched_switch");
- }
- break;
- case WAKEUP:
- ret = settracer("wakeup");
- break;
- case WAKEUPRT:
- ret = settracer("wakeup_rt");
- break;
- default:
- if (strlen(tracer)) {
- ret = settracer(tracer);
- if (strcmp(tracer, "events") == 0 && ftrace)
- ret = settracer(functiontracer);
- }
- else {
- printf("cyclictest: unknown tracer!\n");
- ret = 0;
- }
- break;
- }
-
- if (enable_events)
- /* turn on all events */
- event_enable_all();
-
- if (ret)
- fprintf(stderr, "Requested tracer '%s' not available\n", tracer);
-
- setkernvar(traceroptions, "print-parent");
- setkernvar(traceroptions, "latency-format");
- if (verbose) {
- setkernvar(traceroptions, "sym-offset");
- setkernvar(traceroptions, "sym-addr");
- setkernvar(traceroptions, "verbose");
- } else {
- setkernvar(traceroptions, "nosym-offset");
- setkernvar(traceroptions, "nosym-addr");
- setkernvar(traceroptions, "noverbose");
- }
- if (traceopt_count) {
- int i;
- for (i = 0; i < traceopt_count; i++)
- setkernvar(traceroptions, traceptr[i]);
- }
- setkernvar("tracing_max_latency", "0");
- if (trace_file_exists("latency_hist"))
- setkernvar("latency_hist/wakeup/reset", "1");
-
- /* open the tracing on file descriptor */
- if (trace_fd == -1) {
- char path[MAX_PATH];
- strcpy(path, fileprefix);
- if (trace_file_exists("tracing_on"))
- strcat(path, "tracing_on");
- else
- strcat(path, "tracing_enabled");
- if ((trace_fd = open(path, O_WRONLY)) == -1)
- fatal("unable to open %s for tracing", path);
- }
-
- open_tracemark_fd();
- } else {
- setkernvar("trace_all_cpus", "1");
- setkernvar("trace_freerunning", "1");
- setkernvar("trace_print_on_crash", "0");
- setkernvar("trace_user_triggered", "1");
- setkernvar("trace_user_trigger_irq", "-1");
- setkernvar("trace_verbose", "0");
- setkernvar("preempt_thresh", "0");
- setkernvar("wakeup_timing", "0");
- setkernvar("preempt_max_latency", "0");
- if (ftrace)
- setkernvar("mcount_enabled", "1");
- setkernvar("trace_enabled", "1");
- setkernvar("latency_hist/wakeup_latency/reset", "1");
- }
-
- tracing(1);
-}
-
/*
* parse an input value as a base10 value followed by an optional
* suffix. The input value is presumed to be in seconds, unless
@@ -987,7 +664,9 @@ static void *timerthread(void *param)
int stopped = 0;
cpu_set_t mask;
pthread_t thread;
- unsigned long smi_now, smi_old;
+ unsigned long smi_now, smi_old = 0;
+
+ memset(&stop, 0, sizeof(stop));
/* if we're running in numa mode, set our memory node */
if (par->node != -1)
@@ -1195,7 +874,6 @@ static void *timerthread(void *param)
stopped++;
tracemark("hit latency threshold (%llu > %d)",
(unsigned long long) diff, tracelimit);
- tracing(0);
shutdown++;
pthread_mutex_lock(&break_thread_id_lock);
if (break_thread_id == 0)
@@ -1281,18 +959,6 @@ out:
/* Print usage information */
static void display_help(int error)
{
- char tracers[MAX_PATH];
- char *prefix;
-
- prefix = get_debugfileprefix();
- if (prefix[0] == '\0')
- strcpy(tracers, "unavailable (debugfs not mounted)");
- else {
- fileprefix = prefix;
- if (kernvar(O_RDONLY, "available_tracers", tracers, sizeof(tracers)))
- strcpy(tracers, "none");
- }
-
printf("cyclictest V %1.2f\n", VERSION);
printf("Usage:\n"
"cyclictest <options>\n\n"
@@ -1309,17 +975,13 @@ static void display_help(int error)
#endif
"-A USEC --aligned=USEC align thread wakeups to a specific offset\n"
"-b USEC --breaktrace=USEC send break trace command when latency > USEC\n"
- "-B --preemptirqs both preempt and irqsoff tracing (used with -b)\n"
"-c CLOCK --clock=CLOCK select clock\n"
" 0 = CLOCK_MONOTONIC (default)\n"
" 1 = CLOCK_REALTIME\n"
- "-C --context context switch tracing (used with -b)\n"
"-d DIST --distance=DIST distance of thread intervals in us, default=500\n"
"-D --duration=TIME specify a length for the test run.\n"
" Append 'm', 'h', or 'd' to specify minutes, hours or days.\n"
" --latency=PM_QOS write PM_QOS to /dev/cpu_dma_latency\n"
- "-E --event event tracing (used with -b)\n"
- "-f --ftrace function trace (when -b is active)\n"
"-F --fifo=<path> create a named pipe at path and write stats to it\n"
"-h --histogram=US dump a latency histogram to stdout after the run\n"
" US is the max latency time to be be tracked in microseconds\n"
@@ -1327,7 +989,6 @@ static void display_help(int error)
"-H --histofall=US same as -h except with an additional summary column\n"
" --histfile=<path> dump the latency histogram to <path> instead of stdout\n"
"-i INTV --interval=INTV base interval of thread in us default=1000\n"
- "-I --irqsoff Irqsoff tracing (used with -b)\n"
"-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n"
" --laptop Save battery when running cyclictest\n"
" This will give you poorer realtime results\n"
@@ -1335,12 +996,9 @@ static void display_help(int error)
"-m --mlockall lock current and future memory allocations\n"
"-M --refresh_on_max delay updating the screen until a new max\n"
" latency is hit. Userful for low bandwidth.\n"
- " --notrace suppress tracing\n"
"-N --nsecs print results in ns instead of us (default us)\n"
"-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED\n"
- "-O TOPT --traceopt=TOPT trace option\n"
"-p PRIO --priority=PRIO priority of highest prio thread\n"
- "-P --preemptoff Preempt off tracing (used with -b)\n"
" --policy=NAME policy of measurement thread, where NAME may be one\n"
" of: other, normal, batch, idle, fifo or rr.\n"
" --priospread spread priority levels starting at specified value\n"
@@ -1366,8 +1024,6 @@ static void display_help(int error)
" without NUM, threads = max_cpus\n"
" without -t default = 1\n"
" --tracemark write a trace mark when -b latency is exceeded\n"
- "-T TRACE --tracer=TRACER set tracing function\n"
- " configured tracers: %s\n"
"-u --unbuffered force unbuffered output for live processing\n"
#ifdef NUMA
"-U --numa Standard NUMA testing (similar to SMP option)\n"
@@ -1375,11 +1031,8 @@ static void display_help(int error)
#endif
"-v --verbose output values on stdout for statistics\n"
" format: n:c:v n=tasknum c=count v=value in us\n"
- "-w --wakeup task wakeup tracing (used with -b)\n"
- "-W --wakeuprt rt task wakeup tracing (used with -b)\n"
" --dbg_cyclictest print info useful for debugging cyclictest\n"
- "-x --posix_timers use POSIX timers instead of clock_nanosleep.\n",
- tracers
+ "-x --posix_timers use POSIX timers instead of clock_nanosleep.\n"
);
if (error)
exit(EXIT_FAILURE);
@@ -1497,17 +1150,17 @@ static char *policyname(int policy)
enum option_values {
- OPT_AFFINITY=1, OPT_NOTRACE, OPT_BREAKTRACE, OPT_PREEMPTIRQ, OPT_CLOCK,
- OPT_CONTEXT, OPT_DISTANCE, OPT_DURATION, OPT_LATENCY, OPT_EVENT,
- OPT_FTRACE, OPT_FIFO, OPT_HISTOGRAM, OPT_HISTOFALL, OPT_HISTFILE,
- OPT_INTERVAL, OPT_IRQSOFF, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
- OPT_NANOSLEEP, OPT_NSECS, OPT_OSCOPE, OPT_TRACEOPT, OPT_PRIORITY,
- OPT_PREEMPTOFF, OPT_QUIET, OPT_PRIOSPREAD, OPT_RELATIVE, OPT_RESOLUTION,
- OPT_SYSTEM, OPT_SMP, OPT_THREADS, OPT_TRACER, OPT_TRIGGER,
- OPT_TRIGGER_NODES, OPT_UNBUFFERED, OPT_NUMA, OPT_VERBOSE, OPT_WAKEUP,
- OPT_WAKEUPRT, OPT_DBGCYCLIC, OPT_POLICY, OPT_HELP, OPT_NUMOPTS,
- OPT_ALIGNED, OPT_SECALIGNED, OPT_LAPTOP, OPT_SMI, OPT_TRACEMARK,
- OPT_POSIX_TIMERS,
+ OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_CLOCK,
+ OPT_DISTANCE, OPT_DURATION, OPT_LATENCY,
+ OPT_FIFO, OPT_HISTOGRAM, OPT_HISTOFALL, OPT_HISTFILE,
+ OPT_INTERVAL, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
+ OPT_NANOSLEEP, OPT_NSECS, OPT_OSCOPE, OPT_PRIORITY,
+ OPT_QUIET, OPT_PRIOSPREAD, OPT_RELATIVE, OPT_RESOLUTION,
+ OPT_SYSTEM, OPT_SMP, OPT_THREADS, OPT_TRIGGER,
+ OPT_TRIGGER_NODES, OPT_UNBUFFERED, OPT_NUMA, OPT_VERBOSE,
+ OPT_DBGCYCLIC, OPT_POLICY, OPT_HELP, OPT_NUMOPTS,
+ OPT_ALIGNED, OPT_SECALIGNED, OPT_LAPTOP, OPT_SMI,
+ OPT_TRACEMARK, OPT_POSIX_TIMERS,
};
/* Process commandline options */
@@ -1524,32 +1177,24 @@ static void process_options (int argc, char *argv[], int max_cpus)
*/
static struct option long_options[] = {
{"affinity", optional_argument, NULL, OPT_AFFINITY},
- {"notrace", no_argument, NULL, OPT_NOTRACE },
{"aligned", optional_argument, NULL, OPT_ALIGNED },
{"breaktrace", required_argument, NULL, OPT_BREAKTRACE },
- {"preemptirqs", no_argument, NULL, OPT_PREEMPTIRQ },
{"clock", required_argument, NULL, OPT_CLOCK },
- {"context", no_argument, NULL, OPT_CONTEXT },
{"distance", required_argument, NULL, OPT_DISTANCE },
{"duration", required_argument, NULL, OPT_DURATION },
{"latency", required_argument, NULL, OPT_LATENCY },
- {"event", no_argument, NULL, OPT_EVENT },
- {"ftrace", no_argument, NULL, OPT_FTRACE },
{"fifo", required_argument, NULL, OPT_FIFO },
{"histogram", required_argument, NULL, OPT_HISTOGRAM },
{"histofall", required_argument, NULL, OPT_HISTOFALL },
{"histfile", required_argument, NULL, OPT_HISTFILE },
{"interval", required_argument, NULL, OPT_INTERVAL },
- {"irqsoff", no_argument, NULL, OPT_IRQSOFF },
{"laptop", no_argument, NULL, OPT_LAPTOP },
{"loops", required_argument, NULL, OPT_LOOPS },
{"mlockall", no_argument, NULL, OPT_MLOCKALL },
{"refresh_on_max", no_argument, NULL, OPT_REFRESH },
{"nsecs", no_argument, NULL, OPT_NSECS },
{"oscope", required_argument, NULL, OPT_OSCOPE },
- {"traceopt", required_argument, NULL, OPT_TRACEOPT },
{"priority", required_argument, NULL, OPT_PRIORITY },
- {"preemptoff", no_argument, NULL, OPT_PREEMPTOFF },
{"quiet", no_argument, NULL, OPT_QUIET },
{"priospread", no_argument, NULL, OPT_PRIOSPREAD },
{"relative", no_argument, NULL, OPT_RELATIVE },
@@ -1561,20 +1206,16 @@ static void process_options (int argc, char *argv[], int max_cpus)
{"spike", required_argument, NULL, OPT_TRIGGER },
{"spike-nodes", required_argument, NULL, OPT_TRIGGER_NODES },
{"threads", optional_argument, NULL, OPT_THREADS },
- {"tracemark", no_argument, NULL, OPT_TRACEMARK },
- {"tracer", required_argument, NULL, OPT_TRACER },
{"unbuffered", no_argument, NULL, OPT_UNBUFFERED },
{"numa", no_argument, NULL, OPT_NUMA },
{"verbose", no_argument, NULL, OPT_VERBOSE },
- {"wakeup", no_argument, NULL, OPT_WAKEUP },
- {"wakeuprt", no_argument, NULL, OPT_WAKEUPRT },
{"dbg_cyclictest", no_argument, NULL, OPT_DBGCYCLIC },
{"policy", required_argument, NULL, OPT_POLICY },
{"help", no_argument, NULL, OPT_HELP },
{"posix_timers", no_argument, NULL, OPT_POSIX_TIMERS },
- {NULL, 0, NULL, 0}
+ {NULL, 0, NULL, 0 },
};
- int c = getopt_long(argc, argv, "a::A::b:Bc:Cd:D:Efh:H:i:Il:MNo:O:p:PmqrRsSt::uUvD:wWT:x",
+ int c = getopt_long(argc, argv, "a::A::b:c:d:D:h:H:i:l:MNo:p:mqrRsSt::uUvD:x",
long_options, &option_index);
if (c == -1)
break;
@@ -1607,15 +1248,10 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'b':
case OPT_BREAKTRACE:
tracelimit = atoi(optarg); break;
- case 'B':
- case OPT_PREEMPTIRQ:
- tracetype = PREEMPTIRQSOFF; break;
case 'c':
case OPT_CLOCK:
clocksel = atoi(optarg); break;
case 'C':
- case OPT_CONTEXT:
- tracetype = CTXTSWITCH; break;
case 'd':
case OPT_DISTANCE:
distance = atoi(optarg); break;
@@ -1623,17 +1259,11 @@ static void process_options (int argc, char *argv[], int max_cpus)
case OPT_DURATION:
duration = parse_time_string(optarg); break;
case 'E':
- case OPT_EVENT:
- enable_events = 1; break;
- case 'f':
- case OPT_FTRACE:
- tracetype = FUNCTION; ftrace = 1; break;
case 'F':
case OPT_FIFO:
use_fifo = 1;
strncpy(fifopath, optarg, strlen(optarg));
break;
-
case 'H':
case OPT_HISTOFALL:
histofall = 1; /* fall through */
@@ -1647,16 +1277,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'i':
case OPT_INTERVAL:
interval = atoi(optarg); break;
- case 'I':
- case OPT_IRQSOFF:
- if (tracetype == PREEMPTOFF) {
- tracetype = PREEMPTIRQSOFF;
- strncpy(tracer, "preemptirqsoff", sizeof(tracer));
- } else {
- tracetype = IRQSOFF;
- strncpy(tracer, "irqsoff", sizeof(tracer));
- }
- break;
case 'l':
case OPT_LOOPS:
max_cycles = atoi(optarg); break;
@@ -1672,25 +1292,12 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 'o':
case OPT_OSCOPE:
oscope_reduction = atoi(optarg); break;
- case 'O':
- case OPT_TRACEOPT:
- traceopt(optarg); break;
case 'p':
case OPT_PRIORITY:
priority = atoi(optarg);
if (policy != SCHED_FIFO && policy != SCHED_RR)
policy = SCHED_FIFO;
break;
- case 'P':
- case OPT_PREEMPTOFF:
- if (tracetype == IRQSOFF) {
- tracetype = PREEMPTIRQSOFF;
- strncpy(tracer, "preemptirqsoff", sizeof(tracer));
- } else {
- tracetype = PREEMPTOFF;
- strncpy(tracer, "preemptoff", sizeof(tracer));
- }
- break;
case 'q':
case OPT_QUIET:
quiet = 1; break;
@@ -1740,11 +1347,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
if (trigger)
trigger_list_size = atoi(optarg);
break;
- case 'T':
- case OPT_TRACER:
- tracetype = CUSTOM;
- strncpy(tracer, optarg, sizeof(tracer));
- break;
case 'u':
case OPT_UNBUFFERED:
setvbuf(stdout, NULL, _IONBF, 0); break;
@@ -1764,12 +1366,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
break;
case 'v':
case OPT_VERBOSE: verbose = 1; break;
- case 'w':
- case OPT_WAKEUP:
- tracetype = WAKEUP; break;
- case 'W':
- case OPT_WAKEUPRT:
- tracetype = WAKEUPRT; break;
case 'x':
case OPT_POSIX_TIMERS:
use_nanosleep = MODE_CYCLIC; break;
@@ -1787,8 +1383,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
if (latency_target_value < 0)
latency_target_value = 0;
break;
- case OPT_NOTRACE:
- notrace = 1; break;
case OPT_POLICY:
handlepolicy(optarg); break;
case OPT_DBGCYCLIC:
@@ -1802,9 +1396,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
fatal("--smi is not available on your arch\n");
#endif
break;
- case OPT_TRACEMARK:
- notrace = 1; /* using --tracemark implies --notrace */
- trace_marker = 1; break;
}
}
@@ -1887,43 +1478,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
}
}
-static int check_kernel(void)
-{
- struct utsname kname;
- int maj, min, sub, kv, ret;
-
- ret = uname(&kname);
- if (ret) {
- fprintf(stderr, "uname failed: %s. Assuming not 2.6\n",
- strerror(errno));
- return KV_NOT_SUPPORTED;
- }
- sscanf(kname.release, "%d.%d.%d", &maj, &min, &sub);
- if (maj == 2 && min == 6) {
- if (sub < 18)
- kv = KV_26_LT18;
- else if (sub < 24)
- kv = KV_26_LT24;
- else if (sub < 28) {
- kv = KV_26_33;
- strcpy(functiontracer, "ftrace");
- strcpy(traceroptions, "iter_ctrl");
- } else {
- kv = KV_26_33;
- strcpy(functiontracer, "function");
- strcpy(traceroptions, "trace_options");
- }
- } else if (maj >= 3) {
- kv = KV_30;
- strcpy(functiontracer, "function");
- strcpy(traceroptions, "trace_options");
-
- } else
- kv = KV_NOT_SUPPORTED;
-
- return kv;
-}
-
static int check_timer(void)
{
struct timespec ts;
@@ -1952,8 +1506,6 @@ static void sighand(int sig)
shutdown = 1;
if (refresh_on_max)
pthread_cond_signal(&refresh_on_max_cond);
- if (tracelimit)
- tracing(0);
}
static void print_tids(struct thread_param *par[], int nthreads)
@@ -2240,14 +1792,8 @@ int main(int argc, char **argv)
/* use the /dev/cpu_dma_latency trick if it's there */
set_latency_target();
- kernelversion = check_kernel();
-
- if (kernelversion == KV_NOT_SUPPORTED)
- warn("Running on unknown kernel version...YMMV\n");
-
- setup_tracer();
-
- enable_trace_mark();
+ if (tracelimit)
+ enable_trace_mark();
if (check_timer())
warn("High resolution timers not available\n");
@@ -2597,35 +2143,16 @@ int main(int argc, char **argv)
threadfree(parameters[i], sizeof(struct thread_param), parameters[i]->node);
}
out:
- /* ensure that the tracer is stopped */
- if (tracelimit)
- tracing(0);
-
-
/* close any tracer file descriptors */
if (tracemark_fd >= 0)
close(tracemark_fd);
if (trace_fd >= 0)
close(trace_fd);
- if (enable_events)
- /* turn off all events */
- event_disable_all();
-
- /* turn off the function tracer */
- fileprefix = procfileprefix;
- if (tracetype && !notrace)
- setkernvar("ftrace_enabled", "0");
- fileprefix = get_debugfileprefix();
-
/* unlock everything */
if (lockall)
munlockall();
- /* Be a nice program, cleanup */
- if (kernelversion < KV_26_33)
- restorekernvars();
-
/* close the latency_target_fd if it's open */
if (latency_target_fd >= 0)
close(latency_target_fd);
--
2.14.3

View File

@ -1,77 +0,0 @@
From ef49ccfab821010319d4ff6b1332fa890889aeac Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com>
Date: Mon, 6 May 2019 14:40:46 -0500
Subject: [PATCH 1/2] hwlatdetect: disable/enable c-state transitions during
detection
Recent performance tuning problems led me to realize that just running
at fifo:99 and turning off interrupts isn't enough while looking for
BIOS induced latencies. Power savings logic is built into most modern
cpus and so must be disabled while looking for BIOS induced (SMI/NMI)
latencies.
Use the /dev/cpu_dma_latency mechanism to disable c-state transitions
while running the hardware latency detector. Open the file
/dev/cpu_dma_latency and write a 32-bit zero to it, which will prevent
c-state transitions while the file is open.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/hwlatdetect/hwlatdetect.py | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
index 2c8f9f160419..368079a158b1 100755
--- a/src/hwlatdetect/hwlatdetect.py
+++ b/src/hwlatdetect/hwlatdetect.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
-# (C) 2018 Clark Williams <williams@redhat.com>
+# (C) 2018,2019 Clark Williams <williams@redhat.com>
# (C) 2015,2016 Clark Williams <williams@redhat.com>
# (C) 2009 Clark Williams <williams@redhat.com>
#
@@ -213,6 +213,22 @@ class Detector(object):
counts = [ int(x.strip()) for x in p.stdout.readlines()]
return counts
+ # methods for preventing/enabling c-state transitions
+ # openinging /dev/cpu_dma_latency and writeing a 32-bit zero to that file will prevent
+ # c-state transitions while the file descriptor is open.
+ # use c_states_off() to disable c-state transitions
+ # use c_states_on() to close the file descriptor and re-enable c-states
+ #
+ def c_states_off(self):
+ self.dma_latency_handle = os.open("/dev/cpu_dma_latency", os.O_WRONLY)
+ os.write(self.dma_latency_handle, b'\x00\x00\x00\x00')
+ debug("c-states disabled")
+
+ def c_states_on(self):
+ if self.dma_latency_handle:
+ os.close(self.dma_latency_handle)
+ debug("c-states enabled")
+
def cleanup(self):
raise RuntimeError("must override base method 'cleanup'!")
@@ -235,6 +251,7 @@ class Detector(object):
def start(self):
count = 0
threshold = int(self.get("threshold"))
+ self.c_states_off()
debug("enabling detector module (threshold: %d)" % threshold)
self.set("enable", 1)
while self.get("enable") == 0:
@@ -258,6 +275,7 @@ class Detector(object):
time.sleep(0.1)
debug("retrying disable of detector module(%d)" % count)
self.set("enable", 0)
+ self.c_states_on()
debug("detector module disabled")
def detect(self):
--
2.20.1

View File

@ -1,77 +0,0 @@
From 40eb214cc9b43f99df3d20b3303b7df1d149b5e2 Mon Sep 17 00:00:00 2001
From: Qiao Zhao <qzhao@redhat.com>
Date: Thu, 25 Jul 2019 10:49:15 +0800
Subject: [PATCH] ptsematest, sigwaittest, pmqtest, svsematest reprot error
"Could not access /sys/kernel/debug/tracing/tracing_enabled"
tracing_enabled was deprecated a long time ago and is no longer
available, use tracing_on instead
To reproduce
This patches fixes that
Signed-off-by: Qiao Zhao <qzhao@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/pmqtest/pmqtest.c | 2 +-
src/ptsematest/ptsematest.c | 2 +-
src/sigwaittest/sigwaittest.c | 2 +-
src/svsematest/svsematest.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c
index 2191710961fe..a04fc49872bf 100644
--- a/src/pmqtest/pmqtest.c
+++ b/src/pmqtest/pmqtest.c
@@ -204,7 +204,7 @@ void *pmqthread(void *param)
char tracing_enabled_file[MAX_PATH];
strcpy(tracing_enabled_file, get_debugfileprefix());
- strcat(tracing_enabled_file, "tracing_enabled");
+ strcat(tracing_enabled_file, "tracing_on");
int tracing_enabled =
open(tracing_enabled_file, O_WRONLY);
if (tracing_enabled >= 0) {
diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c
index e8a3177b63dd..553759212ac9 100644
--- a/src/ptsematest/ptsematest.c
+++ b/src/ptsematest/ptsematest.c
@@ -131,7 +131,7 @@ void *semathread(void *param)
char tracing_enabled_file[MAX_PATH];
strcpy(tracing_enabled_file, get_debugfileprefix());
- strcat(tracing_enabled_file, "tracing_enabled");
+ strcat(tracing_enabled_file, "tracing_on");
int tracing_enabled =
open(tracing_enabled_file, O_WRONLY);
if (tracing_enabled >= 0) {
diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c
index 4579f903c909..59f28a5babcb 100644
--- a/src/sigwaittest/sigwaittest.c
+++ b/src/sigwaittest/sigwaittest.c
@@ -179,7 +179,7 @@ void *semathread(void *param)
char tracing_enabled_file[MAX_PATH];
strcpy(tracing_enabled_file, get_debugfileprefix());
- strcat(tracing_enabled_file, "tracing_enabled");
+ strcat(tracing_enabled_file, "tracing_on");
int tracing_enabled =
open(tracing_enabled_file, O_WRONLY);
if (tracing_enabled >= 0) {
diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
index 01083d13dde6..8f880786ec0f 100644
--- a/src/svsematest/svsematest.c
+++ b/src/svsematest/svsematest.c
@@ -185,7 +185,7 @@ void *semathread(void *param)
char tracing_enabled_file[MAX_PATH];
strcpy(tracing_enabled_file, get_debugfileprefix());
- strcat(tracing_enabled_file, "tracing_enabled");
+ strcat(tracing_enabled_file, "tracing_on");
int tracing_enabled =
open(tracing_enabled_file, O_WRONLY);
if (tracing_enabled >= 0) {
--
2.20.1

View File

@ -1,115 +0,0 @@
From 59c7b5e334940fff29ea49aa722d1c43c88a436b Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 7 May 2019 15:26:38 +0200
Subject: [PATCH 1/2] queuelat: Assume queuelat and queuelat scripts are in the
path
Assume queuelat and queuelat scripts are in the path. Don't hardcode
their location.
Write the temporary data to /usr/tmp/outfile
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/queuelat/determine_maximum_mpps.sh | 35 +++++++++++++-------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh
index cf7a8cab9cc4..cd45454720f7 100755
--- a/src/queuelat/determine_maximum_mpps.sh
+++ b/src/queuelat/determine_maximum_mpps.sh
@@ -8,6 +8,7 @@
PREAMBLE="taskset -c 2 chrt -f 1"
MAXLAT="20000"
CYCLES_PER_PACKET="300"
+OUTFILE=/usr/tmp/outfile
echo "Determining maximum mpps the machine can handle"
echo "Will take a few minutes to determine mpps value"
@@ -16,10 +17,10 @@ echo "And 10 minutes run to confirm the final mpps value is stable"
for mpps in `seq 3 3 50`; do
echo testing $mpps Mpps
- outfile=`mktemp`
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
+ OUTFILE=`mktemp`
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
- exceeded=`grep exceeded $outfile`
+ exceeded=`grep exceeded $OUTFILE`
if [ ! -z "$exceeded" ]; then
echo mpps failed: $mpps
break;
@@ -32,10 +33,10 @@ first_mpps=$(($mpps - 1))
for mpps in `seq $first_mpps -1 3`; do
echo testing $mpps Mpps
- outfile=`mktemp`
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
+ OUTFILE=`mktemp`
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
- exceeded=`grep exceeded $outfile`
+ exceeded=`grep exceeded $OUTFILE`
if [ -z "$exceeded" ]; then
echo mpps success $mpps
break;
@@ -49,10 +50,10 @@ echo second loop mpps: $mpps
for mpps in `seq $second_mpps 0.3 $first_mpps`; do
echo testing $mpps Mpps
- outfile=`mktemp`
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
+ OUTFILE=`mktemp`
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
- exceeded=`grep exceeded $outfile`
+ exceeded=`grep exceeded $OUTFILE`
if [ ! -z "$exceeded" ]; then
echo mpps failure $mpps
break;
@@ -66,10 +67,10 @@ third_mpps=`echo "$mpps -0.1" | bc`
for mpps in `seq $third_mpps -0.1 3`; do
echo testing $mpps Mpps
- outfile=`mktemp`
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh ./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
+ OUTFILE=`mktemp`
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
- exceeded=`grep exceeded $outfile`
+ exceeded=`grep exceeded $OUTFILE`
if [ -z "$exceeded" ]; then
echo mpps success $mpps
break;
@@ -86,8 +87,8 @@ while [ $queuelat_failure == 1 ]; do
echo "$mpps Mpps"
for i in `seq 1 10`; do
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 30 > $outfile
- exceeded=`grep exceeded $outfile`
+ $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+ exceeded=`grep exceeded $OUTFILE`
if [ ! -z "$exceeded" ]; then
echo "mpps failure (run $i) $mpps"
@@ -108,8 +109,8 @@ while [ $queuelat_failure == 1 ]; do
echo -n "Starting 10 minutes run with "
echo "$mpps Mpps"
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `./get_cpuinfo_mhz.sh` -p $mpps -t 600 > $outfile
- exceeded=`grep exceeded $outfile`
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 600 > $OUTFILE
+ exceeded=`grep exceeded $OUTFILE`
if [ ! -z "$exceeded" ]; then
echo "mpps failure (run $i) $mpps"
@@ -124,5 +125,3 @@ echo Final mpps is: $mpps
unset queuelat_failure
unset mpps
-
-
--
2.20.1

View File

@ -1,29 +0,0 @@
From 38e7eb899ffbf23773f8c396c7195e6af0dad099 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 7 May 2019 15:47:55 +0200
Subject: [PATCH 2/2] queuelat: Install queuelat helper scripts from the
rt-tests Makefile
Install queuelat helper scripts from the rt-tests Makefile
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 16cd2f9bdd03..ea80923918f7 100644
--- a/Makefile
+++ b/Makefile
@@ -180,6 +180,8 @@ install: all install_hwlatdetect
mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
cp $(TARGETS) "$(DESTDIR)$(bindir)"
+ install src/queuelat/get_cpuinfo_mhz.sh "$(DESTDIR)$(bindir)"
+ install src/queuelat/determine_maximum_mpps.sh "${DESTDIR}${bindir}"
gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
--
2.20.1

View File

@ -1,31 +0,0 @@
From 5c7ee5d6a0444f785a96811b88e604954a1f1ef4 Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Mon, 7 Jan 2019 15:35:56 -0200
Subject: [PATCH] queuelat: use mfence for rdtsc ordering
cpuid is causing register corruption: use mfence instead.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
v2: fix signed-off-by line
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/queuelat/queuelat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/queuelat/queuelat.c b/src/queuelat/queuelat.c
index 2230d04bf391..3b291f168768 100644
--- a/src/queuelat/queuelat.c
+++ b/src/queuelat/queuelat.c
@@ -265,7 +265,7 @@ static inline unsigned long long __rdtscll(void)
{
DECLARE_ARGS(val, low, high);
- asm volatile("cpuid; rdtsc" : EAX_EDX_RET(val, low, high));
+ asm volatile("mfence; rdtsc" : EAX_EDX_RET(val, low, high));
return EAX_EDX_VAL(val, low, high);
}
--
2.20.1

View File

@ -0,0 +1,306 @@
From cf75a53807ae85cca05f08efc00c28b44beeff9a Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 27 Oct 2023 14:57:46 -0400
Subject: [PATCH 2/3] rt-tests: Add missing SPDX licenses
Add missing SPDX licenses
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 1 +
src/backfire/backfire.4 | 1 +
src/backfire/sendme.8 | 1 +
src/backfire/sendme.c | 15 +--------------
src/cyclictest/cyclictest.8 | 1 +
src/cyclictest/get_cyclictest_snapshot.8 | 1 +
src/hackbench/hackbench.8 | 1 +
src/hwlatdetect/hwlatdetect.8 | 1 +
src/oslat/oslat.8 | 1 +
src/pi_tests/pi_stress.8 | 1 +
src/pi_tests/pip_stress.8 | 1 +
src/pmqtest/pmqtest.8 | 1 +
src/ptsematest/ptsematest.8 | 1 +
src/queuelat/determine_maximum_mpps.8 | 1 +
src/queuelat/queuelat.8 | 1 +
src/queuelat/targeted-ipi/Kbuild | 1 +
src/queuelat/targeted-ipi/Makefile | 1 +
src/rt-migrate-test/rt-migrate-test.8 | 1 +
src/sched_deadline/cyclicdeadline.8 | 1 +
src/sched_deadline/deadline_test.8 | 1 +
src/signaltest/signaltest.8 | 1 +
src/sigwaittest/sigwaittest.8 | 1 +
src/ssdd/ssdd.8 | 1 +
src/svsematest/svsematest.8 | 1 +
25 files changed, 25 insertions(+), 14 deletions(-)
+# SPDX-License-Identifier: GPL-2.0-or-later
*~
.*
*.o
diff --git a/Makefile b/Makefile
index 8d3268d19901..2808c212058a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
VERSION = 2.6
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
diff --git a/src/backfire/backfire.4 b/src/backfire/backfire.4
index 66dccd1dd1f0..1057a432eefb 100644
--- a/src/backfire/backfire.4
+++ b/src/backfire/backfire.4
@@ -1,4 +1,5 @@
.TH "backfire" "4" "0.1" "" "Driver"
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH "NAME"
.LP
backfire \- send a signal from driver to user
diff --git a/src/backfire/sendme.8 b/src/backfire/sendme.8
index 05f3a1c14d8b..9c973607f859 100644
--- a/src/backfire/sendme.8
+++ b/src/backfire/sendme.8
@@ -1,4 +1,5 @@
.TH "sendme" "8" "0.2" "" ""
+# SPDX-License-Identifier: GPL-2.0-only
.SH "NAME"
.LP
\fBsendme\fR \- Send a signal from driver to user and measure time intervals
diff --git a/src/backfire/sendme.c b/src/backfire/sendme.c
index d963723b1c93..da10397846f7 100644
--- a/src/backfire/sendme.c
+++ b/src/backfire/sendme.c
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* sendme.c
*
* Copyright (C) 2009 Carsten Emde <C.Emde@osadl.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
*/
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8
index 1cc72e64effc..2ccdfc1ff5fa 100644
--- a/src/cyclictest/cyclictest.8
+++ b/src/cyclictest/cyclictest.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH CYCLICTEST 8 "April 22, 2016"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/cyclictest/get_cyclictest_snapshot.8 b/src/cyclictest/get_cyclictest_snapshot.8
index e9251a8e821f..45eb90da070c 100644
--- a/src/cyclictest/get_cyclictest_snapshot.8
+++ b/src/cyclictest/get_cyclictest_snapshot.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH GET_CYCLICTEST_SNAPSHOT 8 "July 6, 2020"
+# SPDX-License-Identifier: GPL-2.0-or-later
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/hackbench/hackbench.8 b/src/hackbench/hackbench.8
index 4c2c8ad9cb1a..1f3ecd51cc07 100644
--- a/src/hackbench/hackbench.8
+++ b/src/hackbench/hackbench.8
@@ -1,4 +1,5 @@
.TH "hackbench" "8" "September 19, 2020" "" ""
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH "NAME"
hackbench \- scheduler benchmark/stress test
.SH "SYNOPSIS"
diff --git a/src/hwlatdetect/hwlatdetect.8 b/src/hwlatdetect/hwlatdetect.8
index 21d0fe4aaca2..560ff7cc0cc9 100644
--- a/src/hwlatdetect/hwlatdetect.8
+++ b/src/hwlatdetect/hwlatdetect.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH HWLATDETECT 8 "May 12, 2009"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/oslat/oslat.8 b/src/oslat/oslat.8
index eb96448bfff1..fba10ab4944d 100644
--- a/src/oslat/oslat.8
+++ b/src/oslat/oslat.8
@@ -1,4 +1,5 @@
.TH OSLAT 8 "August 17, 2020"
+# SPDX-License-Identifier: GPL-3.0-only
.\" for manpage-specific macros, see man(7)
.SH NAME
oslat \- OS Latency Detector
diff --git a/src/pi_tests/pi_stress.8 b/src/pi_tests/pi_stress.8
index 8c43a1ccf676..6ae28c178d75 100644
--- a/src/pi_tests/pi_stress.8
+++ b/src/pi_tests/pi_stress.8
@@ -4,6 +4,7 @@
.\"{{{}}}
.\"{{{ Title
.TH pi_stress 8 "Nov 27, 2006" "" "Linux System Administrator's Manual"
+# SPDX-License-Identifier: GPL-2.0-or-later
.\"}}}
.\"{{{ Name
.SH NAME
diff --git a/src/pi_tests/pip_stress.8 b/src/pi_tests/pip_stress.8
index 1808330b2e17..0d06dd2215f8 100644
--- a/src/pi_tests/pip_stress.8
+++ b/src/pi_tests/pip_stress.8
@@ -1,5 +1,6 @@
.\"
.TH PIP\ STRESS 8 "September 17, 2018"
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH NAME
.B pip_stress \- Priority Inheritance with processes
.SH SYNOPSIS
diff --git a/src/pmqtest/pmqtest.8 b/src/pmqtest/pmqtest.8
index 4fbcc5c27ce2..cce43d9b5ee5 100644
--- a/src/pmqtest/pmqtest.8
+++ b/src/pmqtest/pmqtest.8
@@ -1,4 +1,5 @@
.TH "pmqtest" "8" "0.1" "" ""
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH "NAME"
.LP
\fBpmqtest\fR \- Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues
diff --git a/src/ptsematest/ptsematest.8 b/src/ptsematest/ptsematest.8
index 57e1658612c0..5e944d353ec0 100644
--- a/src/ptsematest/ptsematest.8
+++ b/src/ptsematest/ptsematest.8
@@ -1,4 +1,5 @@
.TH "ptsematest" "8" "0.1" "" ""
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH "NAME"
.LP
\fBptsematest\fR \- Start two threads and measure the latency of interprocess communication with POSIX mutex.
diff --git a/src/queuelat/determine_maximum_mpps.8 b/src/queuelat/determine_maximum_mpps.8
index c48a651160d3..ba2cc2ad9c2a 100644
--- a/src/queuelat/determine_maximum_mpps.8
+++ b/src/queuelat/determine_maximum_mpps.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH DETERMINE_MAXIMUM_MPPS 8 "Dec 4, 2020"
+# SPDX-License-Identifier: GPL-2.0-or-later
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/queuelat/queuelat.8 b/src/queuelat/queuelat.8
index 2f99e703c990..aa497e93f738 100644
--- a/src/queuelat/queuelat.8
+++ b/src/queuelat/queuelat.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH QUEUELAT 8 "Sept 3, 2018"
+# SPDX-License-Identifier: GPL-2.0-or-later
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/queuelat/targeted-ipi/Kbuild b/src/queuelat/targeted-ipi/Kbuild
index 9bdd5c63a00a..6d569c38aab8 100644
--- a/src/queuelat/targeted-ipi/Kbuild
+++ b/src/queuelat/targeted-ipi/Kbuild
@@ -1,2 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
obj-m := targeted-ipi.o
diff --git a/src/queuelat/targeted-ipi/Makefile b/src/queuelat/targeted-ipi/Makefile
index ee5591fe45c0..9dabd7c22fe0 100644
--- a/src/queuelat/targeted-ipi/Makefile
+++ b/src/queuelat/targeted-ipi/Makefile
@@ -1 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
obj-$(CONFIG_TARGETED_IPI) += targeted-ipi.o
diff --git a/src/rt-migrate-test/rt-migrate-test.8 b/src/rt-migrate-test/rt-migrate-test.8
index 53670e3757fa..88daec50138c 100644
--- a/src/rt-migrate-test/rt-migrate-test.8
+++ b/src/rt-migrate-test/rt-migrate-test.8
@@ -1,5 +1,6 @@
.\"
.TH RT-MIGRATE-TEST 8 "September 18, 2020"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever editing this manpage
.SH NAME
rt-migrate-test \- real-time task migration program
diff --git a/src/sched_deadline/cyclicdeadline.8 b/src/sched_deadline/cyclicdeadline.8
index fab301edc86a..bfc6327c51da 100644
--- a/src/sched_deadline/cyclicdeadline.8
+++ b/src/sched_deadline/cyclicdeadline.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH CYCLICDEADLINE 8 "January 16, 2020"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/sched_deadline/deadline_test.8 b/src/sched_deadline/deadline_test.8
index 8f32c5b6feb6..0d7932250e23 100644
--- a/src/sched_deadline/deadline_test.8
+++ b/src/sched_deadline/deadline_test.8
@@ -1,5 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.TH DEADLINE_TEST 8 "November 1, 2018"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
diff --git a/src/signaltest/signaltest.8 b/src/signaltest/signaltest.8
index da818ecdef67..a8c9a6e91c68 100644
--- a/src/signaltest/signaltest.8
+++ b/src/signaltest/signaltest.8
@@ -1,5 +1,6 @@
.\"
.TH SIGNALTEST 8 "November 15, 2020"
+# SPDX-License-Identifier: GPL-2.0-only
.\" Please adjust this date whenever updating this manpage
.SH NAME
signaltest \- signal roundtrip test software
diff --git a/src/sigwaittest/sigwaittest.8 b/src/sigwaittest/sigwaittest.8
index 26ad333e2841..f0ecbb6448b1 100644
--- a/src/sigwaittest/sigwaittest.8
+++ b/src/sigwaittest/sigwaittest.8
@@ -1,4 +1,5 @@
.TH "sigwaittest" "8" "0.1" "" ""
+# SPDX-License-Identifier: GPL-2.0-only
.SH "NAME"
.LP
\fBsigwaittest\fR \- Start two threads or fork two processes and measure the latency between sending and receiving a signal
diff --git a/src/ssdd/ssdd.8 b/src/ssdd/ssdd.8
index a3b9d790dec4..e6be5ef6a27d 100644
--- a/src/ssdd/ssdd.8
+++ b/src/ssdd/ssdd.8
@@ -1,4 +1,5 @@
.TH SSDD 8 "September 19, 2020"
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH NAME
ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs
.SH SYNOPSIS
diff --git a/src/svsematest/svsematest.8 b/src/svsematest/svsematest.8
index 93abf55f3d4d..7865ed0550e9 100644
--- a/src/svsematest/svsematest.8
+++ b/src/svsematest/svsematest.8
@@ -1,4 +1,5 @@
.TH "svsematest" "8" "0.1" "" ""
+# SPDX-License-Identifier: GPL-2.0-or-later
.SH "NAME"
.LP
\fBsvsematest\fR \- Start two threads or fork two processes and measure the latency of SYSV semaphores
--
2.41.0

View File

@ -1,29 +0,0 @@
From 026f2a31c505b244bbb4a811ba5329225e3f66f1 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 13 Jun 2018 01:53:11 +0200
Subject: [PATCH] rt-tests: Makefile: Change syntax for python3
When testing for the PYLIB version, we need to explicitly
specify python3 and fix the print syntax
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index cffb255d96d1..8b08385890fe 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CFLAGS ?= -Wall -Wno-nonnull
CPPFLAGS += -D_GNU_SOURCE -Isrc/include
LDFLAGS ?=
-PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
+PYLIB ?= $(shell python3 -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())')
ifndef DEBUG
CFLAGS += -O2 -g
--
2.14.4

View File

@ -0,0 +1,37 @@
From 57f8f11fbab520b5cb239451c841f951a994328a Mon Sep 17 00:00:00 2001
From: Mathias Krause <minipli@grsecurity.net>
Date: Thu, 19 Oct 2023 08:53:28 +0200
Subject: [PATCH 1/3] rt-tests: Makefile: Restore support for Exuberant Ctags
Commit 974241c78a6f ("rt-tests: Makefile: ctags: Change obsolete extra
to extras") is Universal Ctags specific and broke Exuberant Ctags.
Restore support for Exuberant Ctags by automatically detecting which
variant to use.
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 223a839151ec..8d3268d19901 100644
--- a/Makefile
+++ b/Makefile
@@ -251,6 +251,11 @@ help:
@echo " tarball : make a rt-tests tarball suitable for release"
@echo " help : print this message"
+# Universal Ctags warns about the backward compatible option '--extra' and
+# wants it to be called '--extras'.
+CTAGS_BIN = ctags
+CTAGS_EXTRA := $(shell $(CTAGS_BIN) --version 2>&1 | grep -iq universal && echo extras || echo extra)
+
.PHONY: tags
tags:
- ctags -R --extras=+f --c-kinds=+p --exclude=tmp --exclude=BUILD *
+ $(CTAGS_BIN) -R --$(CTAGS_EXTRA)=+f --c-kinds=+p --exclude=tmp --exclude=BUILD *
--
2.41.0

View File

@ -1,48 +0,0 @@
From 524aebc39039e0035a768b423ad66c4d03098a35 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 14 Jan 2019 21:39:47 +0100
Subject: [PATCH 2/5] rt-tests: Makefile: ssdd: Incoroporate ssdd into the
rt-tests Makefile
Incoroporate ssdd into the rt-tests build
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 06f399cc629d..16cd2f9bdd03 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@ sources = cyclictest.c \
svsematest.c \
cyclicdeadline.c \
deadline_test.c \
- queuelat.c
+ queuelat.c \
+ ssdd.c
TARGETS = $(sources:.c=)
LIBS = -lrt -lpthread
@@ -86,6 +87,7 @@ VPATH += src/lib:
VPATH += src/hackbench:
VPATH += src/sched_deadline:
VPATH += src/queuelat:
+VPATH += src/ssdd:
$(OBJDIR)/%.o: %.c | $(OBJDIR)
$(CC) -D VERSION=$(VERSION) -c $< $(CFLAGS) $(CPPFLAGS) -o $@
@@ -146,6 +148,9 @@ hackbench: $(OBJDIR)/hackbench.o
queuelat: $(OBJDIR)/queuelat.o $(OBJDIR)/librttest.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
+ssdd: $(OBJDIR)/ssdd.o $(OBJDIR)/librttest.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
+
LIBOBJS =$(addprefix $(OBJDIR)/,error.o rt-get_cpu.o rt-sched.o rt-utils.o)
$(OBJDIR)/librttest.a: $(LIBOBJS)
$(AR) rcs $@ $^
--
2.20.1

View File

@ -1,64 +0,0 @@
From 1b68647387067fea4779a1c80d4155be2187ed21 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 8 Oct 2018 15:11:43 +0200
Subject: [PATCH] rt-tests: Remove install and build of backfire and sendme
Leave the source code in place but remove the install and build of
backfire and sendme for now as it is broken
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/Makefile b/Makefile
index 5447ca9de108..26dd96f0c5fd 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,6 @@ sources = cyclictest.c \
pmqtest.c \
ptsematest.c \
rt-migrate-test.c \
- sendme.c \
signaltest.c \
sigwaittest.c \
svsematest.c \
@@ -83,7 +82,6 @@ VPATH += src/ptsematest:
VPATH += src/sigwaittest:
VPATH += src/svsematest:
VPATH += src/pmqtest:
-VPATH += src/backfire:
VPATH += src/lib:
VPATH += src/hackbench:
VPATH += src/sched_deadline:
@@ -139,9 +137,6 @@ svsematest: $(OBJDIR)/svsematest.o $(OBJDIR)/librttest.a
pmqtest: $(OBJDIR)/pmqtest.o $(OBJDIR)/librttest.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(EXTRA_LIBS)
-sendme: $(OBJDIR)/sendme.o $(OBJDIR)/librttest.a
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(EXTRA_LIBS)
-
pip_stress: $(OBJDIR)/pip_stress.o $(OBJDIR)/librttest.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
@@ -180,9 +175,6 @@ install: all install_hwlatdetect
mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
cp $(TARGETS) "$(DESTDIR)$(bindir)"
- install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
- install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
- gzip -c src/backfire/backfire.4 >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
@@ -190,7 +182,6 @@ install: all install_hwlatdetect
gzip -c src/sigwaittest/sigwaittest.8 >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
gzip -c src/svsematest/svsematest.8 >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
gzip -c src/pmqtest/pmqtest.8 >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz"
- gzip -c src/backfire/sendme.8 >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
gzip -c src/hackbench/hackbench.8 >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
gzip -c src/signaltest/signaltest.8 >"$(DESTDIR)$(mandir)/man8/signaltest.8.gz"
gzip -c src/pi_tests/pip_stress.8 >"$(DESTDIR)$(mandir)/man8/pip_stress.8.gz"
--
2.14.4

View File

@ -0,0 +1,57 @@
From 3cbd2fc69160f5c21b66445279fcb31c22e29915 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 27 Oct 2023 15:22:30 -0400
Subject: [PATCH 3/3] rt-tests: Remove remaining unnecessary texts after adding
SPDX licenses
Remove remaining unnecessary texts after adding SPDX licenses
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/signaltest/signaltest.c | 4 ----
src/sigwaittest/sigwaittest.c | 14 --------------
2 files changed, 18 deletions(-)
diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
index 4737c253b1af..5412c50f7e17 100644
--- a/src/signaltest/signaltest.c
+++ b/src/signaltest/signaltest.c
@@ -5,10 +5,6 @@
*
* (C) 2007 Thomas Gleixner <tglx@linutronix.de>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License Version
- * 2 as published by the Free Software Foundation;
- *
*/
#include <fcntl.h>
diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c
index 818e3a8e680a..55855769c63b 100644
--- a/src/sigwaittest/sigwaittest.c
+++ b/src/sigwaittest/sigwaittest.c
@@ -5,20 +5,6 @@
*
* Copyright (C) 2009 Carsten Emde <C.Emde@osadl.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
*/
#include <stdio.h>
--
2.41.0

View File

@ -1,85 +0,0 @@
From 7ea837b01d7e75e403a935bb40b11824f8568d4a Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 5 Nov 2018 15:11:31 +0100
Subject: [PATCH] rt-tests: cyclictest: Remove numa from help
The numa mode is invoked automatically now, and not from the commandline.
Remove it from help and the man page as well.
Clean-up messages to refer to "numa" or "numa" mode instead of "--numa"
Even though --smp can still be invoked, change messages to "smp mode"
for consistency.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.8 | 3 ---
src/cyclictest/cyclictest.c | 10 +++-------
src/cyclictest/rt_numa.h | 2 +-
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8
index 36edacc3209f..a05d1f4c9d4a 100644
--- a/src/cyclictest/cyclictest.8
+++ b/src/cyclictest/cyclictest.8
@@ -185,9 +185,6 @@ of the trace functions available from <debugfs-mountpoint>/kernel/debug/tracing/
.B \-u, \-\-unbuffered
force unbuffered output for live processing
.TP
-.B \-U, --numa
-Standard NUMA testing (similar to SMP option) thread data structures allocated from local node.
-.TP
.B \-v, \-\-verbose
Output values on stdout for statistics. This option is used to gather statistical information about the latency distribution. The output is sent to stdout. The output format is:
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 8bba9fc63ee3..188a202c5171 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1025,10 +1025,6 @@ static void display_help(int error)
" without -t default = 1\n"
" --tracemark write a trace mark when -b latency is exceeded\n"
"-u --unbuffered force unbuffered output for live processing\n"
-#ifdef NUMA
- "-U --numa Standard NUMA testing (similar to SMP option)\n"
- " thread data structures allocated from local node\n"
-#endif
"-v --verbose output values on stdout for statistics\n"
" format: n:c:v n=tasknum c=count v=value in us\n"
" --dbg_cyclictest print info useful for debugging cyclictest\n"
@@ -1329,7 +1325,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
case 't':
case OPT_THREADS:
if (smp) {
- warn("-t ignored due to --smp\n");
+ warn("-t ignored due to smp mode\n");
break;
}
if (optarg != NULL)
@@ -1399,9 +1395,9 @@ static void process_options (int argc, char *argv[], int max_cpus)
if (option_affinity) {
if (smp) {
- warn("-a ignored due to --smp\n");
+ warn("-a ignored due to smp mode\n");
} else if (numa) {
- warn("-a ignored due to --numa\n");
+ warn("-a ignored due to numa mode\n");
}
}
diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h
index 3970e681fe7b..e8cd7f481baa 100644
--- a/src/cyclictest/rt_numa.h
+++ b/src/cyclictest/rt_numa.h
@@ -253,7 +253,7 @@ static inline void rt_bitmask_free(struct bitmask *mask)
static void numa_on_and_available()
{
if (numa) /* NUMA is not defined here */
- fatal("--numa specified and numa functions not available.\n");
+ fatal("numa mode and numa functions not available.\n");
}
#endif /* NUMA */
--
2.14.5

View File

@ -1,30 +0,0 @@
From ed58e7ad038f11a8e5f194fb9314ebc791e21b99 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Thu, 15 Nov 2018 13:00:06 +0100
Subject: [PATCH] rt-tests: deadline_test: Add NULL check before freeing
setcpu_buf
setcpu_buf doesn't always call malloc, so NULL check it before freeing
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/sched_deadline/deadline_test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c
index 2a63c5f91639..b213c206559c 100644
--- a/src/sched_deadline/deadline_test.c
+++ b/src/sched_deadline/deadline_test.c
@@ -2092,6 +2092,8 @@ int main (int argc, char **argv)
printf("\n");
}
- free(setcpu_buf);
+ if (!setcpu_buf)
+ free(setcpu_buf);
+
return 0;
}
--
2.14.5

View File

@ -1,101 +0,0 @@
From 803c33cfe83a8e215bdb4f393f90d1e175f78318 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 2 Nov 2018 16:16:45 +0100
Subject: [PATCH] rt-tests: deadline_test: Add a manpage
Add an initial manpage for deadline_test.
Modify the Makefile to install it too.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 1 +
src/sched_deadline/deadline_test.8 | 65 ++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 src/sched_deadline/deadline_test.8
diff --git a/Makefile b/Makefile
index 26dd96f0c5fd..06f399cc629d 100644
--- a/Makefile
+++ b/Makefile
@@ -186,6 +186,7 @@ install: all install_hwlatdetect
gzip -c src/signaltest/signaltest.8 >"$(DESTDIR)$(mandir)/man8/signaltest.8.gz"
gzip -c src/pi_tests/pip_stress.8 >"$(DESTDIR)$(mandir)/man8/pip_stress.8.gz"
gzip -c src/queuelat/queuelat.8 >"$(DESTDIR)$(mandir)/man8/queuelat.8.gz"
+ gzip -c src/sched_deadline/deadline_test.8 >"$(DESTDIR)$(mandir)/man8/deadline_test.8.gz"
.PHONY: install_hwlatdetect
install_hwlatdetect: hwlatdetect
diff --git a/src/sched_deadline/deadline_test.8 b/src/sched_deadline/deadline_test.8
new file mode 100644
index 000000000000..5dc99c0bfc63
--- /dev/null
+++ b/src/sched_deadline/deadline_test.8
@@ -0,0 +1,65 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH DEADLINE_TEST 8 "November 1, 2018"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+deadline_test \- High resolution test program
+.SH DESCRIPTION
+.PP
+This program is used to test the deadline scheduler (SCHED_DEADLINE tasks)
+.SH SYNOPSIS
+.B deadline_test
+.RI "[ \-hb ] [ \-r prio ] [ \-c cpulist ] [ \-i interval ] [ \-p percent ] [ \-P percent ] [ \-t threads ] [ \-s step[us) ]"
+
+.SH OPTIONS
+.TP
+.B \-h
+Show this help menu
+.br
+.TP
+.B \-b
+Bind on the last cpu. (shortcut for -c <lastcpu>)
+.br
+.TP
+.B \-r prio
+Add an RT task with given prio to stress system
+.br
+.TP
+.B \-c cpulist
+Comma/hyphen separated list of CPUs to run deadline tasks on
+.br
+.TP
+.B \-i interval
+The shortest deadline for the tasks
+.br
+.TP
+.B \-p percent
+The percent of bandwidth to use (1-90%)
+.br
+.TP
+.B \-P percent
+The percent of runtime for execution completion
+ (Default 100%)
+.br
+.TP
+.B \-t threads
+The number of threads to run as deadline (default 1)
+.br
+.TP
+.B \-s step(us)
+The amount to increase the deadline for each task (default 500us)
+.br
+.SH AUTHOR
+Deadline test was written by Steven Rostedt <rostedt@goodmis.org>
+.PP
+This manual page was written by John Kacur <jkacur@redhat.com>
--
2.14.5

View File

@ -1,97 +0,0 @@
From bbf4d5adf23fa2b81a1cdb92c40c3451376ac672 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 10 May 2019 15:58:39 +0200
Subject: [PATCH 2/2] rt-tests: hwlatdetect.py: Code clean-up
- Remove obsolete from __future__
- Fix spacing around calls to print, open and brackets
- Fix spacing around assignments
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/hwlatdetect/hwlatdetect.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
index 368079a158b1..b72bdc3aa930 100755
--- a/src/hwlatdetect/hwlatdetect.py
+++ b/src/hwlatdetect/hwlatdetect.py
@@ -8,7 +8,7 @@
# modify it under the terms of the GNU General Public License Version 2
# as published by the Free Software Foundation.
-from __future__ import print_function
+
import sys
import os
@@ -84,7 +84,7 @@ class DebugFS(object):
try:
val = f.readline()
except OSError as e:
- print ("errno: %s" % e)
+ print("errno: %s" % e)
if e.errno == errno.EAGAIN:
val = None
else:
@@ -159,7 +159,7 @@ class Kmod(object):
return
# now look for already loaded module
- for l in open ('/proc/modules'):
+ for l in open('/proc/modules'):
field = l.split()
if self.name in field[0]:
self.preloaded = True
@@ -210,7 +210,7 @@ class Detector(object):
if self.have_msr:
p = subprocess.Popen(['/usr/sbin/rdmsr', '-a', '-d', '0x34'], stdout=subprocess.PIPE)
p.wait()
- counts = [ int(x.strip()) for x in p.stdout.readlines()]
+ counts = [int(x.strip()) for x in p.stdout.readlines()]
return counts
# methods for preventing/enabling c-state transitions
@@ -295,11 +295,11 @@ class Tracer(Detector):
class Sample(object):
'private class for tracer sample data'
- __slots__= 'timestamp', 'inner', 'outer',
+ __slots__ = 'timestamp', 'inner', 'outer',
def __init__(self, line):
fields = line.split()
i,o = fields[6].split('/')
- ts=fields[7][3:]
+ ts = fields[7][3:]
self.timestamp = str(ts)
self.inner = int(i)
self.outer = int(o)
@@ -332,14 +332,14 @@ class Tracer(Detector):
self.set('current_tracer', 'hwlat')
def set(self, field, val):
- path=self.translate(field)
+ path = self.translate(field)
self.debugfs.putval(path, str(val))
def get(self, field):
if field == "count":
return len(self.samples)
elif field == "max":
- max=0
+ max = 0
for values in self.samples:
s = int(values.largest())
if s > max:
@@ -435,7 +435,7 @@ class Hwlat(Detector):
def display(self):
for s in self.samples:
- print (s)
+ print(s)
def save(self, output=None):
if output:
--
2.20.1

View File

@ -1,30 +0,0 @@
From 77be335d8b09afa662eb0965b9b18a6105fa9dcc Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 18 Sep 2018 02:30:00 +0200
Subject: [PATCH] rt-tests: manpages: Modify makefile for queuelat.8 and
pip_stress.8
Modify the manpage to include queuelat.8 and pip_stress.8 for the
install
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 8b08385890fe..5447ca9de108 100644
--- a/Makefile
+++ b/Makefile
@@ -193,6 +193,8 @@ install: all install_hwlatdetect
gzip -c src/backfire/sendme.8 >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
gzip -c src/hackbench/hackbench.8 >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
gzip -c src/signaltest/signaltest.8 >"$(DESTDIR)$(mandir)/man8/signaltest.8.gz"
+ gzip -c src/pi_tests/pip_stress.8 >"$(DESTDIR)$(mandir)/man8/pip_stress.8.gz"
+ gzip -c src/queuelat/queuelat.8 >"$(DESTDIR)$(mandir)/man8/queuelat.8.gz"
.PHONY: install_hwlatdetect
install_hwlatdetect: hwlatdetect
--
2.14.4

View File

@ -0,0 +1,42 @@
From 4aeacf722cee26a3f88ab7f631c9ab9ba6ecdb49 Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Thu, 1 Feb 2024 14:50:54 -0300
Subject: [PATCH 2/2] rt-tests: oslat: convert to nanoseconds correctly
With buckets of size 1us, accounting for measurements in the
[1ns, 999ns] range are done to the 2us bucket (while they
should be accounted in the 1us bucket):
001 (us): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
002 (us): 41916187 41937649 41938461 42029055 ...
003 (us): 969 985 958 972 964 986 970 961 973 ...
Fix this by doing a plain cycles -> nanoseconds convertion:
001 (us): 43287555 43086678 43087427 43109974 ...
002 (us): 983 987 985 975 982 960 993 961 992 ...
003 (us): 9 6 7 13 9 22 3 21 3 3 8 8 10 11 3 55
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reported-by: Chuck Newman <chuck.newman@hpe.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/oslat/oslat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index e398f205b40a..0863297f2cf1 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -334,7 +334,7 @@ static void insert_bucket(struct thread *t, stamp_t value)
uint64_t extra;
double us;
- lat = (value * g.unit_per_us + t->counter_mhz - 1) / t->counter_mhz;
+ lat = (value * g.unit_per_us) / t->counter_mhz;
us = (double)lat / g.unit_per_us;
if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %.*f us!\n";
--
2.43.0

View File

@ -0,0 +1,34 @@
From 251d082403b371098c8420c01d1b058b12a9cc78 Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Thu, 1 Feb 2024 13:05:38 -0300
Subject: [PATCH 1/2] rt-tests: oslat should use MHz, not Mhz
Usage of Mhz, in oslat, is incorrect:
From https://www.nist.gov/pml/owm/writing-si-metric-system-units#:~:text=NOT%20250%20mms.-,Capitalization,the%20beginning%20of%20the%20sentence:
"When the unit is derived from the name of a person, the symbol or the first letter of the symbol is an uppercase letter (W for the unit "watt" or Pa for the unit "pascal")."
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reported-by: Chuck Newman <chuck.newman@hpe.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/oslat/oslat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index 4bdca643da72..e398f205b40a 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -501,7 +501,7 @@ static void write_summary(struct thread *t)
calculate(t);
putfield("Core", t[i].core_i, "d", "");
- putfield("Counter Freq", t[i].counter_mhz, "u", " (Mhz)");
+ putfield("Counter Freq", t[i].counter_mhz, "u", " (MHz)");
for (j = 0; j < g.bucket_size; j++) {
if (j < g.bucket_size-1 && g.output_omit_zero_buckets) {
--
2.43.0

View File

@ -1,32 +0,0 @@
From 4b58d4277496b5ad61b66cbc6fb4aea91ceec6dd Mon Sep 17 00:00:00 2001
From: Juri Lelli <juri.lelli@redhat.com>
Date: Fri, 14 Sep 2018 12:04:48 +0200
Subject: [PATCH 1/5] rt-tests: pi_stress: remove unused report option from
help
Command line --report option is not actually implemented (even if
advertised on --help).
Remove it from the help banner.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/pi_tests/pi_stress.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index 36b64ca1672c..ac7646cd2613 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c
@@ -1032,7 +1032,6 @@ void usage(void)
ngroups);
printf
("\t--inversions=<n>- number of inversions per group [infinite]\n");
- printf("\t--report=<path>\t- output to file [/dev/null]\n");
printf("\t--rr\t\t- use SCHED_RR for test threads [SCHED_FIFO]\n");
printf("\t--sched\t\t- scheduling options per thread type:\n");
printf("\t\tid=[high|med|low]\t\t\t- select thread\n");
--
2.14.4

View File

@ -1,70 +0,0 @@
From 2342d8be62a510569f8cbc9fe41574b6bc370073 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 17 Sep 2018 23:13:53 +0200
Subject: [PATCH 3/5] rt-tests: pip_stress: Add an initial man page for
pip_stress
This adds a man page for pip_stress
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/pi_tests/pip_stress.8 | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 src/pi_tests/pip_stress.8
diff --git a/src/pi_tests/pip_stress.8 b/src/pi_tests/pip_stress.8
new file mode 100644
index 000000000000..1808330b2e17
--- /dev/null
+++ b/src/pi_tests/pip_stress.8
@@ -0,0 +1,47 @@
+.\"
+.TH PIP\ STRESS 8 "September 17, 2018"
+.SH NAME
+.B pip_stress \- Priority Inheritance with processes
+.SH SYNOPSIS
+.B pip_stress
+
+.SH DESCRIPTION
+This program demonstrates the technique of using priority inheritance (PI)
+mutexes with processes instead of threads.
+The way to do this is to obtain some shared memory - in this case with
+mmap that backs a pthread_mutex_t since this will support PI.
+Pay particular attention to how this is intialized to support processes.
+Function init_shared_pthread_mutex() does this by setting the
+pthread_mutexattr to PTHREAD_PROCESS_SHARED and the mutex protocol to
+PTHREAD_PRIO_INHERIT.
+In this program we purposely try to invoke a classic priority inversion.
+A low priority process grabs the mutex and does some work.
+A high priority process comes a long and is blocked since the mutex is taken.
+A medium priority process that doesn't require the mutex then takes the
+processor. Because the processes are restricted to one cpu, the low priority
+processes never makes any progress because the medium priority process
+runs in an infinite loop. This is a priority inversion because the
+medium priority process is running at the expensive of the high priority
+process. However, since we have used PRIO_INHERIT and are running on a
+machine that supports preemption, the high priority process will lend it's
+priority to the low priority process which will preempt the medium priority
+process. The low priority process will then release the mutex which the
+high priority process can obtain. When the high priority process gets to run
+it kills the medium priority process.
+The state structure keeps track of the progress. Although this program
+is set up to likely trigger an inversion, there is no guarantee that
+scheduling will make that happen. After the program completes it reports
+whether a priority inversion occurred or not. In either case this program
+demonstrates how to use priority inheritance mutexes with processes.
+In fact, you would be better off to avoid scenarios in which a priority
+inversion occurs if possible - this program tries to trigger them just
+to show that it works. If you are having difficulty triggering an inversion,
+merely increase the time that the low priority process sleeps while
+holding the lock. (usleep);
+Also note that you have to run as a user with permission to change
+scheduling priorities.
+.BR
+.SH AUTHOR
+pip_stress was written by John Kacur <jkacur at redhat.com>
+.PP
+This manual page was also written by John Kacur
--
2.14.4

View File

@ -1,65 +0,0 @@
From e86709cd38349514dddbef0bf2b43c1d459797d3 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 14 Jun 2019 15:03:26 +0200
Subject: [PATCH] rt-tests: ssdd: Add a simple manpage for ssdd
Add a simple manpage to rt-tests for ssdd, and modify the manpage to
install it
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 1 +
src/ssdd/ssdd.8 | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 src/ssdd/ssdd.8
diff --git a/Makefile b/Makefile
index ea80923918f7..0258fe9b6dfd 100644
--- a/Makefile
+++ b/Makefile
@@ -194,6 +194,7 @@ install: all install_hwlatdetect
gzip -c src/pi_tests/pip_stress.8 >"$(DESTDIR)$(mandir)/man8/pip_stress.8.gz"
gzip -c src/queuelat/queuelat.8 >"$(DESTDIR)$(mandir)/man8/queuelat.8.gz"
gzip -c src/sched_deadline/deadline_test.8 >"$(DESTDIR)$(mandir)/man8/deadline_test.8.gz"
+ gzip -c src/ssdd/ssdd.8 >"$(DESTDIR)$(mandir)/man8/ssdd.8.gz"
.PHONY: install_hwlatdetect
install_hwlatdetect: hwlatdetect
diff --git a/src/ssdd/ssdd.8 b/src/ssdd/ssdd.8
new file mode 100644
index 000000000000..44638489f0d1
--- /dev/null
+++ b/src/ssdd/ssdd.8
@@ -0,0 +1,29 @@
+.TH SSDD 8 "June 13, 2019"
+.SH NAME
+ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs
+.SH SYNOPSIS
+.B ssdd
+.RI "[nforks] [niters]"
+.SH DESCRIPTION
+Have a tracer do a bunch of PTRACE_SINGLESTEPs against
+a tracee as fast as possible. Create several of these
+tracer/tracee pairs and see if they can be made to
+interfere with each other.
+The tracer waits on each PTRACE_SINGLESTEP with a waitpid(2)
+and checks that waitpid's return values for correctness.
+.SH OPTIONS
+.B nforks
+number of tracer/tracee pairs to fork off.
+Default is 10.
+.br
+.TP
+.B niters
+number of PTRACE_SINGLESTEP iterations to
+do before declaring success, for each tracer/
+tracee pair set up. Default is 10,000.
+
+.SH AUTHOR
+ssdd was written by Joe Korty <joe.korty@concurrent-rt.com>
+.PP
+This manual page was written by John Kacur <jkacur@redhat.com>
+
--
2.20.1

View File

@ -1,48 +0,0 @@
From 153c8171e07d88260b4d40fc7894eca220bbee5b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 15 Jan 2019 11:32:26 +0100
Subject: [PATCH 5/5] ssdd: change the written pid
During debugging it turned out to be helpful to see the parent pid
and mostly the two tasks interact with each other: the tracer and
tracee.
Add this information it can searched for it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ssdd/ssdd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 68a426266dd9..4e293586526e 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -144,7 +144,6 @@ static int forktests(int testid)
struct sigaction act, oact;
parent = getpid();
- printf("forktest#%d/%d: STARTING\n", testid, parent);
child = fork();
if (child == -1) {
@@ -155,6 +154,8 @@ static int forktests(int testid)
if (!child)
child_process();
+ printf("forktest#%d/%d/%d: STARTING\n", testid, parent, child);
+
act.sa_sigaction = sigchld;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_SIGINFO;
@@ -275,6 +276,7 @@ int main(int argc, char **argv)
if (argc)
nsteps = atoi(*argv);
}
+ printf("#main : %d\n", getpid());
printf("#forks: %d\n", nforks);
printf("#steps: %d\n", nsteps);
printf("\n");
--
2.20.1

View File

@ -1,61 +0,0 @@
From c3521e2c81e99078e7d32c43ddbd2287c67ff859 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 15 Jan 2019 11:32:24 +0100
Subject: [PATCH 3/5] ssdd: make every function static
Those functions and variables are not used outside of main so they can
be static.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ssdd/ssdd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 6d09d54e34e1..9b85dfa9d223 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -37,7 +37,7 @@
#define STATE_EXITED_TSIG 6 /* exited with termination signal */
#define STATE_EXITED_ERRSTAT 7 /* exited with non-zero status */
-char *state_name[] = {
+static char *state_name[] = {
[STATE_EXITED] = "STATE_EXITED",
[STATE_STOPPED] = "STATE_STOPPED",
[STATE_SIGNALED] = "STATE_SIGNALED",
@@ -47,7 +47,7 @@ char *state_name[] = {
[STATE_EXITED_ERRSTAT] = "STATE_EXITED_ERRSTAT"
};
-const char *get_state_name(int state)
+static const char *get_state_name(int state)
{
if (state < STATE_EXITED || state > STATE_EXITED_ERRSTAT)
return "?";
@@ -100,7 +100,7 @@ static int do_wait(pid_t *wait_pid, int *ret_sig)
return STATE_UNKNOWN;
}
-int check_sigchld(void)
+static int check_sigchld(void)
{
int i;
/*
@@ -121,9 +121,9 @@ int check_sigchld(void)
return got_sigchld;
}
-pid_t parent;
-int nforks = 10;
-int nsteps = 10000;
+static pid_t parent;
+static int nforks = 10;
+static int nsteps = 10000;
static void sigchld(int sig, unused siginfo_t * info, unused void *arg)
{
--
2.20.1

View File

@ -1,53 +0,0 @@
From b9f812a0c49584d82c37582c7523a5808628b985 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 15 Jan 2019 11:32:25 +0100
Subject: [PATCH 4/5] ssdd: remove sleeps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There two sleep functions which ensure that the forked function sleeps
and does not spin until everything is setup. There is no need for that,
the scheduler will take care of that anyway. Also that sleep may
complete before or after the testcase starts. If it completes afterwards
then the testcase waits to start so…
Remove the sleep, it does change the outcome of the testcase.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ssdd/ssdd.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 9b85dfa9d223..68a426266dd9 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -132,12 +132,8 @@ static void sigchld(int sig, unused siginfo_t * info, unused void *arg)
static void child_process(void)
{
- unused volatile int i;
-
- /* wait for ptrace attach */
- usleep(100000);
while (1)
- i = 0;
+ ;
}
static int forktests(int testid)
@@ -170,9 +166,6 @@ static int forktests(int testid)
exit(1);
}
- /* give both our child and parent time to set things up */
- usleep(125000);
-
/*
* Attach to the child.
*/
--
2.20.1

View File

@ -5,46 +5,27 @@ Name: rt-tests
# BuildRequires: numactl-devel
# Numa argument to make: NUMA=1
#
Version: 1.3
Release: 21%{?dist}
Version: 2.6
Release: 3%{?dist}
License: GPLv2
Group: Development/Tools
URL: git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
Source0: https://www.kernel.org/pub/linux/utils/rt-tests/%{name}-%{version}.tar.gz
Patch1: cyclictest-remove-ftrace-code.patch
Patch2: rt-tests-Makefile-Change-syntax-for-python3.patch
Patch3: Remove-numa-option.patch
Patch4: rt-tests-pi_stress-remove-unused-report-options.patch
Patch5: rt-tests-pip_stress-Add-an-initial-man-page-for-pip_stress.patch
Patch6: add-h-option-to-queuelat.patch
Patch7: Add-queuelat-manpage.patch
Patch8: rt-tests-manpages-Modify-makefile-for-queuelat.8-and.patch
Patch9: rt-tests-Remove-install-and-build-of-backfire-and-sendme.patch
Patch10: rt-tests-deadline_test-Add-a-manpage.patch
Patch11: rt-tests-cyclictest-Remove-numa-from-help.patch
Patch12: rt-tests-deadline_test-Add-NULL-check-before-freeing.patch
Patch13: queuelat-use-mfence-for-rdtsc-ordering.patch
Patch14: cyclictest-fix_with_expected_identifier_in_latest.patch
Patch15: cyclictest-Fix-compiler-warning-about-srncpy-output.patch
Patch16: cyclictest-Make-sure-affinity-is-respected-when-numa.patch
Patch17: Add-ssdd-test-to-the-rt-tests-suite.patch
Patch18: rt-tests-Makefile-ssdd-Incoroporate-ssdd-into-the-rt.patch
Patch19: ssdd-make-every-function-static.patch
Patch20: ssdd-remove-sleeps.patch
Patch21: ssdd-change-the-written-pid.patch
Patch22: queuelat-Assume-queuelat-and-queuelat-scripts-in-path.patch
Patch23: queuelat-Install-queuelat-helper-scripts-from-make.patch
Patch24: hwlatdetect-disable-enable-c-state-transitions.patch
Patch25: rt-tests-hwlatdetect-Code-clean-up.patch
Patch26: rt-tests-ssdd-Add-a-simple-manpage-for-ssdd.patch
Patch27: ptsematest-sigwaittest-pmqtest-svsematest-reprot-err.patch
Source0: https://www.kernel.org/pub/linux/utils/rt-tests/%{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Obsoletes: cyclictest signaltest pi_tests
ExclusiveArch: x86_64
BuildRequires: numactl-devel python3-devel
BuildRequires: gcc
BuildRequires: numactl-devel
BuildRequires: python3-devel
%{?__python3:Requires: %{__python3}}
Requires: bash bc
#Patches
Patch1: rt-tests-Makefile-Restore-support-for-Exuberant-Ctag.patch
Patch2: rt-tests-Add-missing-SPDX-licenses.patch
Patch3: rt-tests-Remove-remaining-unnecessary-texts.patch
Patch4: rt-tests-oslat-should-use-MHz-not-Mhz.patch
Patch5: rt-tests-oslat-convert-to-nanoseconds-correctly.patch
%description
rt-tests is a set of programs that test and measure various components of
@ -52,85 +33,290 @@ real-time kernel behavior. This package measures timer, signal, and hardware
latency. It also tests the functioning of priority-inheritance mutexes.
%prep
%setup -q
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%build
make NUMA=1 HAVE_PARSE_CPUSTRING_ALL=1
%set_build_flags
%make_build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{python3_sitelib}
make DESTDIR=$RPM_BUILD_ROOT prefix=/usr install
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf ${build_root}
%make_install prefix=%{_prefix}
%files
%defattr(-,root,root,-)
%{python3_sitelib}/hwlatdetect.py*
%{python3_sitelib}/__pycache__/hwlatdetect*
%caps(cap_sys_rawio+ep) /usr/bin/cyclictest
/usr/bin/pi_stress
/usr/bin/signaltest
/usr/bin/hwlatdetect
/usr/bin/rt-migrate-test
/usr/bin/pip_stress
/usr/bin/ptsematest
/usr/bin/sigwaittest
/usr/bin/svsematest
/usr/bin/pmqtest
/usr/bin/hackbench
/usr/bin/cyclicdeadline
/usr/bin/deadline_test
/usr/bin/queuelat
/usr/bin/ssdd
/usr/bin/determine_maximum_mpps.sh
/usr/bin/get_cpuinfo_mhz.sh
%{_bindir}/pi_stress
%{_bindir}/signaltest
%{_bindir}/hwlatdetect
%{_bindir}/rt-migrate-test
%{_bindir}/pip_stress
%{_bindir}/ptsematest
%{_bindir}/sigwaittest
%{_bindir}/svsematest
%{_bindir}/pmqtest
%{_bindir}/hackbench
%{_bindir}/cyclicdeadline
%{_bindir}/deadline_test
%{_bindir}/queuelat
%{_bindir}/ssdd
%{_bindir}/oslat
%{_bindir}/determine_maximum_mpps.sh
%{_bindir}/get_cyclictest_snapshot
%{python3_sitelib}/get_cyclictest_snapshot.py*
%{python3_sitelib}/__pycache__/get_cyclictest_snapshot*
%doc
/usr/share/man/man8/cyclictest.8.gz
/usr/share/man/man8/hackbench.8.gz
/usr/share/man/man8/hwlatdetect.8.gz
/usr/share/man/man8/pi_stress.8.gz
/usr/share/man/man8/pmqtest.8.gz
/usr/share/man/man8/ptsematest.8.gz
/usr/share/man/man8/rt-migrate-test.8.gz
/usr/share/man/man8/signaltest.8.gz
/usr/share/man/man8/sigwaittest.8.gz
/usr/share/man/man8/svsematest.8.gz
/usr/share/man/man8/pip_stress.8.gz
/usr/share/man/man8/queuelat.8.gz
/usr/share/man/man8/deadline_test.8.gz
/usr/share/man/man8/ssdd.8.gz
%{_mandir}/man8/cyclictest.8.*
%{_mandir}/man8/hackbench.8.*
%{_mandir}/man8/hwlatdetect.8.*
%{_mandir}/man8/pi_stress.8.*
%{_mandir}/man8/pmqtest.8.*
%{_mandir}/man8/ptsematest.8.*
%{_mandir}/man8/rt-migrate-test.8.*
%{_mandir}/man8/signaltest.8.*
%{_mandir}/man8/sigwaittest.8.*
%{_mandir}/man8/svsematest.8.*
%{_mandir}/man8/pip_stress.8.*
%{_mandir}/man8/queuelat.8.*
%{_mandir}/man8/deadline_test.8.*
%{_mandir}/man8/cyclicdeadline.8.*
%{_mandir}/man8/ssdd.8.*
%{_mandir}/man8/oslat.8.*
%{_mandir}/man8/get_cyclictest_snapshot.8.*
%{_mandir}/man8/determine_maximum_mpps.8.*
%changelog
* Mon Feb 05 2024 John Kacur <jkacur@redhat.com> - 2.6-3
- Fix specfile to apply all patches
Resolves: RHEL-23908
* Mon Feb 05 2024 John Kacur <jkacur@redhat.com> - 2.6-2
- oslat: Fix conversion to nanoseconds for 1us bucket
- oslat: correct spelling of Mhz to MHz
Resolves: RHEL-23908
* Fri Oct 27 2023 John Kacur <jkacur@redhat.com> - 2.6-1
- Update to latest upstream rt-tests v2.6
Resolves: RHEL-7861
* Tue Jan 24 2023 John Kacur <jkacur@redhat.com> - 2.5-1
- Update to latest upstream rt-tests v2.5
Resolves: rhbz#2162780
* Wed Dec 14 2022 Crystal Wood <swood@redhat.com> - 2.4-5
- oslat: Add command line option for bucket width
Resolves: rhbz#2122374
* Mon Nov 14 2022 Leah Leshchinsky <lleshchi@redhat.com> - 2.4-4
- hwlatdetect: Convert to fstrings
- hwlatdetect: Update to integer division
- hwlatdetect: Fix incorrect comment about test duration
Resolves: rhbz#2121152
* Wed Nov 02 2022 John Kacur <jkacur@redhat.com> - 2.4-3
- Add error checking in hackbench to connect and getsockname
- Fix compile warnings in hackbench because of comparison of different signs
- Fix compile warnings in hackbench because of warnings about fall through
Resolves: rhbz#bz2115064
* Fri Oct 07 2022 John Kacur <jkacur@redhat.com> - 2.4-2
- Remove arbitrary limits on number of threads
Resolves: rhbz#2132822
* Fri Jul 8 2022 John Kacur <jkacur@redhat.com> - 2.4-1
- Update to latest rt-tests upstream v2.4
Resolves: rhbz#2068114
* Thu Feb 3 2022 John Kacur <jkacur@redhat.com> - 2.3-2
- Fix parsing of affinity
- Ignore the runtime cpumask if a new cpumask is requested
Resolves: rhbz#2050242
* Thu Jan 13 2022 Leah Leshchinsky <lleshchi@redhat.com> - 2.3-1
- Update to latest upstream 2.3
- Correct the comment of numa_initialize()
- oslat.8: Remove the argument of --bias
Resolves: rhbz#2012292
* Fri Nov 19 2021 John Kacur <jkacur@redhat.com> - 2.1-4
- Fix potential double mount of cgroups for deadline_test
- Fix potential double mount of cgroups for cyclicdeadline
Resolves: rhbz#2024957
* Fri Nov 12 2021 John Kacur <jkacur@redhat.com> - 2.1-3
- Null check to prevent floating point exception in deadline test
Resolves: rhbz#1995005
* Tue Oct 12 2021 Leah Leshchinsky <lleshchi@redhat.com> - 2.1-2
- Add missing option F to optstring
Resolves: rhbz#2000974
* Wed Jun 30 2021 John Kacur <jkacur@redhat.com> - 2.1-1
- Update to rt-tests-2.1 upstream
Resolves: rhbz#1954387
* Fri Feb 19 2021 John Kacur <jkacur@redhat.com> - 1.10-3
- parse_cpumask() is too strict for oslat, allow all possible cores
Resolves: rhbz#1926578
* Thu Feb 18 2021 John Kacur <jkacur@redhat.com> - 1.10-2
- print the version number in oslat everytime.
- use cpuset size as upper bound in loop in oslat
- allocate memory for cpu_set in oslat
Resolves: rhbz#1926578
* Mon Jan 11 2021 John Kacur <jkacur@redhat.com> - 1.10-1
- Upgrade to upstream rt-tests-1.10
Resolves: rhbz#1890556
* Wed Dec 09 2020 John Kacur <jkacur@redhat.com> - 1.9-2
- Don't compress manpages by default in the makefile
- Add a menu to determine_maximum_mpps.sh
- Add determine_maximum_mmps.8 manpage
- Remove get_cpuinfo_mhz.sh and old Makefile in queuelat dir
Resolves: rhbz#1906104
* Tue Nov 24 2020 John Kacur <jkacur@redhat.com> - 1.9-1
- Update to upstream rt-tests-1.9
- Add BuildRequires for gcc
- use set_build_flags
- use macros _bindir, _mandir and _prefix where possible
- remove unnecessary clean section, simply build and install sections
Resolves: rhbz#1894615
* Thu Aug 20 2020 John Kacur <jkacur@redhat.com> - 1.8-11
- Add SPDX license to oslat, and reformat source code to match suite
Resolves: rhbz#1870666
* Wed Aug 19 2020 John Kacur <jkacur@redhat.com> - 1.8-10
- Remove undated Obsoletes from the specfile
Resolves: rhbz#1870212
* Wed Aug 19 2020 John Kacur <jkacur@redhat.com> - 1.8-9
- Add the oslat program to the rt-tests suite
Resolves: rhbz#1869882
* Wed Jul 22 2020 John Kacur <jkacur@redhat.com> - 1.8-8
- Change the conversion format to %ld for the num_processors in pi_stress
Resolves: rhbz#1859397
* Wed Jul 22 2020 John Kacur <jkacur@redhat.com> - 1.8-7
- Limit the number of inversion groups in pi_stress
Resolves: rhbz#1859397
* Mon Jul 06 2020 John Kacur <jkacur@redhat.com> - 1.8-6
- Install new man page get_cyclictest_snapshot
Resolves: rhbz#1826777
* Mon Jul 06 2020 John Kacur <jkacur@redhat.com> - 1.8-5
- get_cyclictest_snapshot: print a warning message if there are no
running cyclictest instances
Resolves: rhbz#1826783
* Mon Jul 06 2020 John Kacur <jkacur@redhat.com> - 1.8-4
- Add a get_cyclictest_snapshot man page and various small fixes
Resolves: rhbz#1826777
* Tue May 12 2020 John Kacur <jkacur@redhat.com> - 1.8-3
- Fix integer overflow in queuelat
Resolves: rhbz#1803862
* Mon May 04 2020 John Kacur <jkacur@redhat.com> - 1.8-2
- Fix setaffinity error on large numa machines
Resolves: rhbz#1831269
* Mon Apr 20 2020 John Kacur <jkacur@redhat.com> - 1.8-1
- Update to upstream rt-tests-1.8
Resolves: rhbz#1816370
* Thu Jan 23 2020 John Kacur <jkacur@redhat.com> - 1.5-18
- Add a man page for cyclicdeadline
- Sync cyclictest man page with the help option
- Sync pi_stress man page with the help option
- Add pi_stress short options to usage message
- Add -S --smp to svsematest man page
- Update ptsematest man page and add -h option
- queuelat man page and help fixes
- display svsematest help without an error message
Resolves: rhbz#1766656
* Fri Jan 17 2020 John Kacur <jkacur@redhat.com> - 1.5-17
- Fix more quoting problems to prevent work splitting
- get_cpuinfo_mhz.sh should print one value
Resolves: rhbz#1719493
* Wed Jan 15 2020 John Kacur <jkacur@redhat.com> - 1.5-16
- Fix hardcoded path to queuelat in determine_maximum_mpps.sh
Resolves: rhbz#1791403
* Mon Nov 25 2019 John Kacur <jkacur@redhat.com> - 1.5-15
- Respun Add SPDX tags patch to correct two incorrect licenes
Resolves: rhbz#1721215
* Mon Nov 25 2019 John Kacur <jkacur@redhat.com> - 1.5-14
- Add SPDX tags
Resolves: rhbz#1721215
* Fri Nov 22 2019 John Kacur <jkacur@redhat.com> - 1.5-13
- Improved version of getting a snapshot of cyclictest without interrupting
- Fixes some problems uncovered by covscan
Resolves: rhbz#1469185
* Tue Nov 19 2019 John Kacur <jkacur@redhat.com> - 1.5-12
- Get a running snapshot of cyclictest without interrupting it
Resolves: rhbz#1469185
* Tue Nov 12 2019 John Kacur <jkacur@redhat.com> - 1.5-11
- Add short and long options and help to ssdd
Resolves: rhbz#1720360
* Mon Nov 11 2019 John Kacur <jkacur@redhat.com> - 1.5-10
- Fix some warnings in determine_maximum_mpps.sh
Resolves: rhbz#1719493
* Wed Oct 30 2019 John Kacur <jkacur@redhat.com> - 1.5-9
-Use libnuma version 2 by default
Resolves: rhbz#1753758
* Wed Oct 30 2019 John Kacur <jkacur@redhat.com> - 1.5-8
- Don't allow OPT_SYSTEM with OPT_POSIX_TIMERS
Resolves: rhbz#1753026
* Wed Oct 30 2019 John Kacur <jkacur@redhat.com> - 1.5-7
- Set affinity before applying numa
Resolves: rhbz#1749958
* Tue Oct 29 2019 John Kacur <jkacur@redhat.com> - 1.5-6
- Increase buffers to avoid overflow
Resolves: rhbz#1753317
* Fri Oct 25 2019 John Kacur <jkacur@redhat.com> - 1.5-5
- Remove invalid / obsolete tracing options from cyclictest manpage
Resolves: rhbz#1749238
* Fri Oct 25 2019 John Kacur <jkacur@redhat.com> - 1.5-4
- Make tracemark work correctly again
Resolves: rhbz#1725134
* Wed Oct 23 2019 John Kacur <jkacur@redhat.com> - 1.5-3
- Add Requires bc for queuelat
Resolves: rhbz#1764290
* Tue Oct 15 2019 John Kacur <jkacur@redhat.com> - 1.5-2
- Add bash as a Require in the spec file, since the suite contains some scripts
Resolves: rhbz#1744983
* Tue Oct 15 2019 John Kacur <jkacur@redhat.com> - 1.5-1
- Rebase to upstream rt-tests-1.5
Resolves: rhbz#1722521
* Wed Jul 31 2019 John Kacur <jkacur@redhat.com> - 1.3-21
- Fix problem when tests use tracing_enabled which is no longer supported
Resolves: rhbz#1731336
@ -613,7 +799,7 @@ Sebastian Andrzej Siewior (1):
* Tue Mar 16 2010 Clark Williams <williams@redhat.com> - 0.67-1
- modified specfile to add hackbench
- modified internal ftrace logic for correct tracing
- Changed rpm %description field to be more descriptive (BZ# 572323)
- Changed rpm %%description field to be more descriptive (BZ# 572323)
- from Carsten Emde <c.emde@osadl.org>
- added smp option to svsematest
- fixed policy display in cyclictest