import rt-tests-1.3-13.el8

This commit is contained in:
CentOS Sources 2019-05-07 09:49:33 -04:00 committed by Andrew Lukoshko
commit 09923039dd
16 changed files with 2315 additions and 0 deletions

1
.gitignore vendored Normal file
View File

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

1
.rt-tests.metadata Normal file
View File

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

View File

@ -0,0 +1,83 @@
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

@ -0,0 +1,93 @@
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

@ -0,0 +1,72 @@
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

@ -0,0 +1,881 @@
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

@ -0,0 +1,31 @@
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,29 @@
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,64 @@
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,85 @@
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

@ -0,0 +1,30 @@
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

@ -0,0 +1,101 @@
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

@ -0,0 +1,30 @@
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,32 @@
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

@ -0,0 +1,70 @@
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

712
SPECS/rt-tests.spec Normal file
View File

@ -0,0 +1,712 @@
Summary: Programs that test various rt-features
Name: rt-tests
# These will be setup by the "make rpm" logic
# Version: 1.0
# BuildRequires: numactl-devel
# Numa argument to make: NUMA=1
#
Version: 1.3
Release: 13%{?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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Obsoletes: cyclictest signaltest pi_tests
ExclusiveArch: x86_64
BuildRequires: numactl-devel python3-devel
%{?__python3:Requires: %{__python3}}
%description
rt-tests is a set of programs that test and measure various components of
real-time kernel behavior. This package measures timer, signal, and hardware
latency. It also tests the functioning of priority-inheritance mutexes.
%prep
%setup -q
%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
%build
make NUMA=1 HAVE_PARSE_CPUSTRING_ALL=1
%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
%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
%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
%changelog
* Tue Jan 08 2019 John Kacur <jkacur@redhat.com> - 1.3-13
- queuelat: use mfence for rdtsc ordering
Resolves: rhbz#1663865
* Thu Nov 15 2018 John Kacur <jkacur@redhat.com> - 1.3-12
- Add NULL check before freeing setcpu_buf
Resolves: rhbz#1641971
* Tue Nov 06 2018 John Kacur <jkacur@redhat.com> - 1.3-11
- Fix the spec file to remove debuginfo from the standard queuelat files
Resolves: rhbz#1641978
* Mon Nov 05 2018 John Kacur <jkacur@redhat.com> - 1.3-10
- Remove numa from help since it is invokved automatically
Resolves: rhbz#1646121
* Fri Nov 02 2018 John Kacur <jkacur@redhat.com> - 1.3-9
- Add a manpage for deadline_test
Resolves: rhbz#1645071
* Mon Oct 08 2018 John Kacur <jkacur@redhat.com> - 1.3-8
- Remove backfire and sendme
Resolves: rhbz#1624885
* Fri Sep 28 2018 John Kacur <jkacur@redhat.com> - 1.3-7
- Change python3 to platform-python
Resolves: rhbz#1633607
* Mon Sep 17 2018 John Kacur <jkacur@redhat.com> - 1.3-6
- rt-tests-pi_stress-remove-unused-report-options.patch
- rt-tests-pip_stress-Add-an-initial-man-page-for-pip_stress.patch
- add-h-option-to-queuelat.patch
- Add-queuelat-manpage.patch
- Modify makefile for queuelat.8 and pip_stress.8
Resolves: rhbz#1614783
* Fri Jun 22 2018 John Kacur <jkacur@redhat.com> - 1.3-5
- Reimplement the removal of --numa, and automate it's detction
Resolves: rhbz#1594273
* Tue Jun 12 2018 John Kacur <jkacur@redhat.com> - 1.3-4
- A few more python3 changes
* Wed May 30 2018 John Kacur <jkacur@redhat.com> - 1.3-3
- Add patches that remove --sma and --numa and automate it
Resolves: rhbz#1518708
* Wed May 30 2018 John Kacur <jkacur@redhat.com> - 1.3-2
- cyclictest: remove tracing, in favour of external tracing
Resolves: rhbz#1518268
* Mon Apr 30 2018 John Kacur <jkacur@redhat.com> - 1.3-1
- New build
- Add test queuelat
- Adds changes for python3 in hwlatdetect
Resolves: rhbz#1543030
Resolves: rhbz#1559520
* Tue Mar 27 2018 John Kacur <jkacur@redhat.com> - 1.2-1
- Remove old patches from the source files
Resolves: rhbz#1559930
* Mon Mar 26 2018 John Kacur <jkacur@redhat.com> - 1.2-0
- Initial Build for 8.0
Resolves: rhbz#1559930
* Wed Dec 20 2017 John Kacur <jkacur@redhat.com> - 1.0.13
- rt-tests-Need-to-generate-debug-info-for-rpms.patch
Resolves: rhbz#1523752
* Thu Nov 02 2017 John Kacur <jkacur@redhat.com> - 1.0.12
- cyclictest: cannot stop when running with -M option
Resolves: rhbz#1473786
* Tue Apr 25 2017 John Kacur <jkacur@redhat.com> - 1.0.11
- cyclictest-touch-threadstacks-on-numa-to-pre-fault-t.patch
Resolves: rhbz1445058
* Thu Mar 23 2017 John Kacur <jkacur@redhat.com> - 1.0.10
- hwlatdetect: modify hwlatdetector.py to use the ftrace hwlatdetector
- hwlatdetect: removed smi_detector support
Resolves: rhbz1365961
* Thu Mar 23 2017 John Kacur <jkacur@redhat.com> - 1.0.9
- hwlatdetect: Add --hardlimit to define the real test failing criteria
Resolves: rhbz1434827
* Thu Mar 23 2017 John Kacur <jkacur@redhat.com> - 1.0.8
- cyclicdeadline: Fix minor spelling mistake
- cyclictest: Correct short option 's'
Resolves: rhbz1434825
* Tue Mar 21 2017 John Kacur <jkacur@redhat.com> - 1.0.7
- rt-tests: hwlatdetect: Improve message if max latency is below threshold
Resolves: rhbz1366289
* Thu Jun 30 2016 John Kacur <jkacur@redhat.com> - 1.0-6
- deadline_test: Made '-i' work and added help text for it
Resolves: rhbz1346771
* Tue Jun 28 2016 John Kacur <jkacur@redhat.com> - 1.0-5
- z-stream release
* Thu Jun 23 2016 John Kacur <jkacur@redhat.com> - 1.0-4
- Add cyclicdeadline and deadline_test to rt-tests
Resolves: rhbz#1349032
* Fri Jun 17 2016 John Kacur <jkacur@redhat.com> - 1.0-3
- Install cyclictest with cap_sys_rawio to access msr and cpuid registers
- Fixed url in Source0
Resolves: rhbz#1346771
* Wed Jun 01 2016 John Kacur <jkacur@redhat.com> - 1.0-2
- cyclictest: new CPUs with SMI counter support
Resolves: rhbz#1341226
* Fri May 20 2016 John Kacur <jkacur@redhat.com> - 1.0-1
- Upgrade to 1.0
Clark Williams (1):
cyclictest: stop any tracing after hitting a breaktrace threshold
John Kacur (8):
rt-tests: Makefile: Assume numa_parse_cpustring_all available
rt-tests: Add man page for rt-migrate-test
rt-tests: Update the cyclictest man page
rt-tests: Add missing option to hwlatdetect man page
rt-tests: Housekeeping fix some spelling errors.
rt-tests: hwlat.txt: smidetect renamed to hwlatdetect
rt-tests: Remove doc/release-checklist.txt
rt-tests: Makefile - bump version to 1.0
- Add patch to install rt-migrate-test.8-man-page
Resolves: rhbz#1283264
- The latest build also includes fixes for undocumented options in cyclictest and hwlatdetect, as well as many more documentation fixes.
Resolves: rhbz#1263718
- Also documenting here that the new feature cyclictest: SMI count/detection via MSR/SMI counter was added in v0.97
Resolves: rhbz#1314869
* Tue May 10 2016 John Kacur <jkacur@redhat.com> - 0.97-3
- cyclictest: stop any tracing after hitting a breaktrace threshold
- Resolves: rhbz#1333762
* Tue Apr 26 2016 John Kacur <jkacur@redhat.com> - 0.97-2
- Change spec file to compile with HAVE_PARSE_CPUSTRING_ALL=1
- This makes numa_parse_cpustring_all() available which is needed for
running cyclictest on isolated cpus.
- Resolves: rhbz#1330468
* Mon Apr 04 2016 John Kacur <jkacur@redhat.com> - 0.97-1
- Changes from v0.93 to v0.97
Clark Williams (9):
hwlatdetect: initial cut at tracking the amount of SMIs that occurred
during a run
rt-migrate-test: updated to latest code from rostedt
Makefile: add target to create OBJDIR before use
specfile: add signaltest manpage to files section and remove trailing
whitespace in changelog
Makefile: have distclean remove .asc file for tarball
Makefile: fixed dropped quote in help target text
hwlatdetect: handle hwlat_detector being builtin rather than module
hwlatdetect: modify to handle python3 prints
hwlatdetect: make reading sample date work with python2 and python3
Daniel Bristot de Oliveira (2):
cyclictest: SMI count/detection via MSR/SMI counter
cyclictest: Add --smi description on cyclictest man page
Darren Hart (2):
rt-tests: Allow for user-specified PYLIB
rt-tests: Break out install_hwlatdetect
Henrik Austad (10):
Add CROSS_COMPILE-switch to CC and AR
Add syscall-number for sched_(gs)etattr() for tile
Add a rebuild-switch to Makefile
Makefile: add librttest to rt-migrate-test
android: adjust target for android
cyclictest: move redefine of CPUSET back to uclib
Android: clean up the bypass ifdeffery
Android: rename arch from bionic to android
Android: Expand match for android in ostype
rt-sched.h: do not unconditionally define syscall-numbers
John Kacur (26):
Fix VERSION in rt-migrate-test
numa_on_and_available: Remove from main in cyclictest
Version bump to v0.94
Explicitly separate VPATH paths with a colon
build: Generate .o, .a, and .d files in bld dir
signaltest: call process_options before calling check_privs
signaltest: Check the status of pthread_create
rt-utils: Add John Kacur to the copyright
rt-utils: Fix some checkpatch errors in rt-utils.c
signaltest: Add a man page to signaltest
Makefile: Document certain compiling options
Makefile: Only call cc -dumpmachine once in the makefile
Bionic: Move android functionality into it's own arch Makefile
maintainence: VERSION bump and Change-log update
cyclictest: Clean-ups in timerthread before working on it
Makefile: OBJDIR should be an order-only-prerequisite
Makefile: Move TARGETS back to a more logical place in the Makefile
cyclictest: Add a feature to record spikes
cyclictest: fix #ifdef broken by NO_PTHREAD_SETAFFINITY
Makefile: Version bump to v0.96
Remove rt-tests.spec-in
gitattributes: add doc, remove rt.spec-in
Makefile: Remove anything to do with rpms, specs etc
Revert changes to rt-migrate-test for exit(1)
cyclictest: Make the tracemark option imply notrace
rt-tests: Makefile: Bump version number to 0.97
Josh Cartwright (8):
rt-tests: workaround poor gzip implementations
hackbench: cleanup error handling in create_worker
cyclictest: consistently make all functions 'static'
cyclictest: use correct type when allocating cpu bitmask size
cyclictest: drop impossible use_fifo conditional
cyclictest: fail if use_fifo && thread creation failed
error: mark fatal, err_exit, err_quit as being noreturn
cyclictest: add option for dumping the histogram in a file
Khem Raj (1):
Makefile: Set CC/AR variable only if it doesn't have a value
Luiz Capitulino (5):
don't use exit(-1) for failures
cyclictest: move tracemark_fd handling to its own function
cyclictest: tracing(): check for notrace
cyclictest: move debugfs init code to its own function
cyclictest: add --tracemark option
Uwe Kleine-König (5):
backfire: remove unused header file
remove several unused Makefiles
rt-migrate-test: remove space before \n
drop compiling without NPTL support
Fix some trivial typos found by codespell(1)
- Resolves: rhbz#1283264
* Wed Aug 12 2015 Clark Williams <williams@redhat.com> - 0.93-1
John Kacur (6):
makefile: Create an rt-tests.tar file using git-archiv
makefile: Change VERSION_STRING to VERSIO
Add .tar files to .gitignor
Create a .gitattribute file to specify what files git-archive should ignore
pi_stress: Fix possible exit on error without releasing mutex
pip_stress: Fix warning: unused variable c
Alexander Stein (1):
cyclictest: Fix long priority help text option
Clark Williams (3):
hwlatdetect: added --watch option to watch output in realtime
doc: fix VERSION in release-checklist.tx
makefile: fixed release targ
* Tue Jun 09 2015 John Kacur <jkacur@redhat.com> - 0.92-1
Anna-Maria Gleixner (2):
cyclictest: Convert the offset of the alignment option to microseconds
cyclictest: Align measurement threads to the next full second
cyclictest: Ensure that next wakeup time is never in the past
Daniel Wagner (1):
pi_stress: Clear affinity for DEADLINE tasks
John Kacur (3):
Fix minor grammar mistake in the help output
Allow building with -DHAVE_PARSE_CPUSTRING_ALL
Add a MAINTAINERS file
Michael Olbrich (2):
Makefile: pi_stress need librttest.a so it should depend on it
Makefile: cleanup linking to librttest.a
Sebastian Andrzej Siewior (1):
cyclictest: consider the 4 as the major version
* Tue Feb 17 2015 Clark Williams <williams@redhat.com> - 0.91-1
- From Boris Egorov <egorov@linux.com>
- rt-migrate-test: exit early if nr_runs is non-positive
- rt-migrate-test: use variables instead of macros
- From Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- pi_stress: remove timestamp of compilation from version output
- rt-migrate-test: make sure input parameters are converted to correct units
- rt-migrate-test: sanity check --prio value
* Tue Jan 27 2015 Clark Williams <williams@redhat.com> - 0.90-1
- pip_stress: parameterize usleep value to work-around platform issues
- From Daniel Wagner <daniel.wagner@bmw-carit.de>:
- pi_stress: Store schedule attributes per thread
- rt-utils: Add gettid()
- rt-utils: Add helper to parse/print scheduling policies
- rt-sched: Add sched_setattr/sched_getattr API
- pi_stress: Use error.h for logging and debugging
- error: Add debug() function
- pi_stress: Remove unused TIMER_SIGNAL definition
- rt-tests.h: Remove unused header file
- hackbench: Don't re-assign context for each fd
- From Joakim Hernberg <jbh@alchemy.lu>:
- cyclictest: make affinity option only use number of online cpus
- From John Kacur <jkacur@redhat.com>:
- cyclictest: Add long option --laptop to preserve battery power
- cyclictest: Fix help for long options only
- cyclictest: Change the output from function sighand() to stderr
- cyclictest: Always print an err message if write of 0 to cpu-dma_latency fails
- rt_numa.h: Suppress discards 'const' qualifier warning
- lib: Rework err_msg_n to output strerror after message
- From Alexey Brodkin <Alexey.Brodkin@synopsys.com>:
- Makefile: allow building selected tests with non-NPTL toolchain
* Sun Mar 30 2014 Clark Williams <williams@redhat.com> - 0.89-1
- clean up debugging comments and printfs from last release
- ran hwlatdetect.py through 2to3, works for both python2 and 3
* Fri Mar 28 2014 Clark Williams <williams@redhat.com> - 0.88-1
- From Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
- cyclictest: Fix tracemark output when the latency threshold is hit on ARM
- From Gary S. Robertson <gary.robertson@linaro.org>:
- cyclictest: Restore CPU affinity function for non-NUMA builds
- cyclictest: Don't offer --numa option when unavailable
* Wed Dec 11 2013 Clark Williams <williams@redhat.com> - 0.87-1
- From Aaron Fabbri <ajfabbri@gmail.com>:
- cyclictest: CPU affinity now takes arbitrary set of cpus
* Fri Nov 15 2013 Clark Williams <williams@redhat.com> - 0.86-1
- cyclictest: allow break threshold without doing any tracing
- cyclictest: add named fifo for statistics
- from John Kacur <jkacur@redhat.com>:
- cyclictest: Align option fixes
- Makefile: Don't tag files in dir BUILD from rpm builds
- Makefile: Add BUILDROOT and SPECS to the dirs to remove for distclean
- Makefile: Add tmp dir to distclean and "make release" call distclean
- Makefile: Don't tag tmp files created when making a release
- from Nicholas Mc Guire <der.herr@hofr.at>:
- cyclictest: add align thread wakeup times option
- cyclictest: modify option handling to use enumerated types
- from Sebastian Andrzej Siewior <bigeasy@linutronix.de>:
- hackbench: init child's struct before using it
- from Jim Somerville <Jim.Somerville@windriver.com>:
- cyclictest: finish removal of 1 second first loops
- from Frank Rowand <frank.rowand@am.sony.com>:
- rt-tests: NUMA optional for make rpm
- cyclictest: white space cleanup
* Tue Nov 13 2012 Clark Williams <williams@redhat.com> - 0.85-1
- [cyclictest] add tracemark function back to breaktrace logic
- from Frank Rowand <frank.rowand@am.sony.com>:
- [cyclictest] report large measured clock latency
- [cyclictest] cleanup getopt_long() parameters
- from John Kacur <jkacur@redhat.com>:
- [Makefile] add CPPFLAGS to pattern rule for dependencies
- [gitignore] exclude patches and .a archives
- from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
- Makefile: separate CFLAGS and CPPFLAGS
- have printf use %s format for strings
- from Bhavesh Davda <bhavesh@vmware.com>:
- cyclictest: histogram overflow instance tracking
- cyclictest: whitespace cleanup
* Wed May 9 2012 Clark Williams <williams@redhat.com> - 0.84-1
- [cyclictest] added -Q/--priospread option to
- from Markus Kohlhase <mail@markus-kohlhase.de>
- [docs] added description from osadl.org
- from Darren Hart <dvhart@linux.intel.com>
- Makefile: Support user supplied CFLAGS and LDFLAGS
- from Steven Rostedt <rostedt@goodmis.org>
- rt-tests: Update rt-migrate-test to use ftrace infrastructure
- from John Kacur <jkacur@redhat.com>
- .gitignore: differentiate between program names and directories
- pi_stress: Check the status of sched_getaffinity
- Makefile: Introduce a static library
- Move info, warn, and fatal functions to error.[ch]
- install: Fix failed to create symbolic link hwlatdetect file exists
- cyclictest: Make cyclictest fail if it cannot run with requested priority
- from Frank Rowand <frank.rowand@am.sony.com>
- cyclictest: segfault with '-a'
- cyclictest: avoid unneeded warning
- cyclictest: warn of interaction between '-a', '--smp', and '--numa'
- Makefile: get machinetype from compiler instead of uname
- cyclictest: incorrect first latency value for --verbose option
- cyclictest: printf format compile warning
* Mon Sep 26 2011 Clark Williams <williams@redhat.com> - 0.83-1
- modified Makefile to be smarter about building with NUMA
* Wed Sep 21 2011 Clark Williams <williams@redhat.com> - 0.82-1
- fix print that causes error in histogram processing
* Tue Sep 20 2011 Clark Williams <williams@redhat.com> - 0.81-1
- cleaned up previous hack for /dev/cpu_dma_latency interface
* Tue Sep 20 2011 Clark Williams <williams@redhat.com> - 0.80-1
- use /dev/cpu_dma_latency interface to prevent cstate transitions
in cyclictest
* Thu Sep 15 2011 Clark Williams <williams@redhat.com> - 0.79-1
- added signal_workers routine to hackbench
- added -F/--fifo option to hackbench
* Wed Sep 14 2011 Clark Williams <williams@redhat.com> - 0.78-1
- modified hackebench signal logic
* Fri Sep 9 2011 Clark Williams <williams@redhat.com> - 0.77-1
- removed tracemark functions (too much contention on multiprocessors)
* Wed Sep 7 2011 Clark Williams <williams@redhat.com> - 0.76-1
- only turn on /proc/sys/kernel/ftrace_enabled for a tracer that
needs it
- make sure to set current_tracer to function for -f switch
* Fri Sep 2 2011 Clark Williams <williams@redhat.com> - 0.75-1
- added utility routines for mounting debugfs and event/tracing manipulation
- from Steven Rostedt <srostedt@redhat.com>:
- allow events for all tracers
- Have -I and -P together also be -B
- do not touch tracing_thresh
- only check file descriptor in tracemark() function
- use interval on first loop instead of 1 second
- allow tracemark() to take variable args
* Thu Aug 18 2011 Clark Williams <williams@redhat.com> - 0.74-1
- changes to deal with 3.0 kernel
- fixed buildrequires in specfile for Python
- fixed spelling error in printf in cyclictest
- from John Kacur <jkacur@redhat.com>
- Make the function header style consistent with the rest of cyclictest.
- Spelling clean-ups
- from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- fix possible buffer overflow in string handling
* Mon May 9 2011 Clark Williams <williams@redhat.com> - 0.73-1
- fixed signal handling in hackbench (avoid thousands of zombies)
- from Geunsik Lim <geunsik.lim@samsung.com>
- fix incorrect wakeup interface in cyclictest
- from Wolfram Sang <w.sang@pengutronix.de>
- Simplify Makefile using -D option to install
- from Carsten Emde <C.Emde@osadl.org>
- add histogram summary column option (-H) to cyclictest
- from Daniel Sangorrin <daniel.sangorrin@gmail.com>
- fix sched_setaffinity type error when building with UCLIB
- from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- install backfire's Makefile
- modernize backfire's Makefile
* Fri Jun 25 2010 Clark Williams <williams@redhat.com> - 0.72-1
- changed 'diff' variable in timerthread() routine to be unsigned
64-bit to avoid overflow issues in debugging
- included <stdint.h> and changed all 'long long' declarations to
use uint64_t and int64_t
* Tue May 18 2010 Clark Williams <williams@redhat.com> - 0.71-1
- from Michal Schmit <mschmidt@redhat.com>:
- fix accumulating overruns in periodic timer mode
* Fri Apr 9 2010 Clark Williams <williams@redhat.com> - 0.70-1
- from Olaf Hering <olaf@aepfle.de>
- skip python dependency during install if python not available
* Fri Apr 9 2010 Clark Williams <williams@redhat.com> - 0.69-1
- fix bus error in cyclictest on NUMA systems with more than 16 cores
- reset default cyclictest policy to SCHED_OTHER
- from Carsten Emde <C.Emde@osadl.org>
- add pmqest program for testing posix message queue performance
- misc doc fixes
* Fri Mar 19 2010 Clark Williams <williams@redhat.com> - 0.68-1
- fix tracing difference between 2.6.24 and 2.6.33
* 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)
- from Carsten Emde <c.emde@osadl.org>
- added smp option to svsematest
- fixed policy display in cyclictest
- from John Kacur <jkacur@redhat.com>
- changed default scheduling policy to SCHED_FIFO
- fixed spelling mistake on cyclictest man page
- use symbolic names for scheduling policy
- reverted commit 582be2a52c43801a10d318de7491f1cc7243d5cf to
deal with bug in priority distribution
- from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- renamed pip to pip_stress
- eliminated use of temp files in dependency generation
- install backfire.c module source in /usr/src/backfire
- from David Sommerseth <davids@redhat.com>
- added new-and-improved hackbench to rt-tests
* Mon Feb 15 2010 Clark Williams <williams@redhat.com> - 0.66-1
- fix incorrect usage of sched_setscheduler in check_privs()
* Mon Feb 8 2010 Clark Williams <williams@redhat.com> - 0.65-1
- add workaround to hwlatdetect for incorrect initializer in
smi_detector.ko
* Fri Jan 29 2010 Clark Williams <williams@redhat.com> - 0.64-1
- from John Kacur <jkacur@redhat.com>
- automatic dependency generation
- style cleanups
- libnuma code cleanups
- add copyright to rt_numa.h
* Wed Jan 27 2010 Clark Williams <williams@redhat.com> - 0.63-1
- added support for libnuma V1 API
* Tue Jan 26 2010 Clark Williams <williams@redhat.com> - 0.62-1
- added NUMA option
- patch from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
to clarify source copyrights
- moved hwlatdetect to python site-library
* Wed Jan 13 2010 Clark Williams <williams@redhat.com> - 0.61-1
- added --smp/-S option to setup for basic SMP testing
- added warn() and fatal() utility functions
* Tue Dec 29 2009 Clark Williams <williams@redhat.com> - 0.60-1
- John Kacur <jkacur@redhat.com>:
- added pip test (process based priority inheritance)
- refactored some error routines into the common library
- added 'make tags' option to Makefile
- Michael Olbrich <m.olbrich@pengutronix.de> added an unbuffered
output option to cyclictest (-u/--unbuffered)
* Mon Dec 21 2009 Clark Williams <williams@redhat.com> - 0.59-1
- deleted classic_pi
- David Sommerseth <davids@redhat.com>:
- added help text for -M (refresh-on-max) option for cyclictest
- fixed parsing of --mlockall in signaltest
- Carsten Emde <C.Emde@osadl.org> provided a better explaination
for using the kernel module with the backfire program
- John Kacur <jkacur@redhat.com> cleaned up the trailing comments
on the guard macros in src/lib/rt-utils.h
* Mon Dec 21 2009 Clark Williams <williams@redhat.com> - 0.58-1
- merged jkacur's portable getcpu() code
- fixed inadvertent conversion of some source to DOS text files
* Mon Dec 14 2009 Clark Williams <williams@redhat.com> - 0.57-1
- John Kacur <jkacur@redhat.com> folded in Carsten Emde's tests
- ptsematest
- sigwaittest
- svsematest
- sendme
- Carsten Emde <carsten.emde@osadl.org> created a utility library
moving functions from cyclictest into src/lib/rt-utils.c
- Makefile cleanups from jkacur
* Thu Dec 10 2009 Clark Williams <williams@redhat.com> - 0.56-1
- cyclictest: added code to print break thread id with -b
* Thu Nov 19 2009 Clark Williams <williams@redhat.com> - 0.55-1
- pi_stress: cosmetic newline added
- fixes from John Kacur <jkacur@redhat.com>
- pi_stress: Remove racy state variables that cause watchdog to trigger
- pi_stress: Check whether quiet is set, before taking shutdown_mtx
- pi_stress: Use a pthread_mutex_t for the global variable shutdown
* Tue Nov 17 2009 Clark Williams <williams@redhat.com> - 0.54-1
- patches from John Kacur <jkacur@redhat.com>
- fix source style issues in pi_stress
- add a DEBUG option to the Makefile
- use CFLAGS for C compiler options
- label targets as PHONY if not generating actual file
- patch to remove rt-tests.spec from .PHONY in Makefile
* Mon Nov 16 2009 Clark Williams <williams@redhat.com> - 0.53-2
- added back missing dist tag for release
* Tue Oct 6 2009 Clark Williams <williams@redhat.com> - 0.53-1
- fixed incorrect format string in hwlatdetect.py
- added docs/release-checklist.txt
* Mon Sep 21 2009 Clark Williams <williams@redhat.com> - 0.52-1
- fixes and cleanups to pi_stress from jkacur
- added rostedt's rt-migrate-test
* Thu Sep 3 2009 Clark Williams <williams@redhat.com> - 0.51-1
- two manpage fixes from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- added -M option from Arnaldo Carvahlo de Melo <acme@redhat.com>
(for use on low-bandwidth connections, defer's update until new max hit)
* Fri Jul 24 2009 Clark Williams <williams@redhat.com> - 0.50-2
- minor patch to fix reporting option of hwlatdetect
* Thu Jul 16 2009 Clark Williams <williams@redhat.com> - 0.50-1
- patch to cyclictest from Sebastian Andrzej Siewior <bigeasy@linutronix.de>
to process options before checking for root user
- patch to cyclictest from Sebastian Andrzej Siewior <bigeasy@linutronix.de>
to exit with proper error code on exit
- added scripts/do-git-push script
- added push target to Makefile
- rewrite of hwlatdetect script to handle old smi_detector module
* Sun Jul 5 2009 Clark Williams <williams@redhat.com> - 0.47-1
- patch from GeunSik Lim <leemgs1@gmail.com> to reorder options for readability
- patch from GeunSik Lim <leemgs1@gmail.com> to add --policy option
- patch from GeunSik Lim <leemgs1@gmail.com> to clarify -h option usage
- modified --policy to take scheduler policy name instead of integers
* Thu Jul 2 2009 Clark Williams <williams@redhat.com> - 0.46-1
- added fix from Daniel Gollub <dgollub@suse.de> (doomsday latency)
* Thu Jul 2 2009 Clark Williams <williams@redhat.com> - 0.45-1
- bugfix from Daniel Gollub <dgollub@suse.de> (fix cyclictest segfault)
- cyclictest format change from Sven-Thorsten Dietrich <sdietrich@suse.de>
- added help target to Makefile
* Tue Jun 30 2009 Clark Williams <williams@redhat.com> - 0.44-1
- fix to specfile (renamed smidetect to hwlatdetect)
- added code to hwlatdetect allow setting window and width properly
* Thu Jun 25 2009 Clark Williams <williams@redhat.com> - 0.43-1
- manpage fixes from Uwe Kleine-Konig <u.kleine-koenig@pengutronix.de>
* Fri Jun 12 2009 Clark Williams <williams@redhat.com> - 0.42-1
- renamed smidetect -> hwlatdetect
* Thu May 28 2009 Clark Williams <williams@redhat.com> - 0.41-1
- added Stefan Agner's patch to fix calculating time difference
when delta is bigger than 2147 seconds
* Wed May 13 2009 Clark Williams <williams@redhat.com> - 0.40-1
- added smidetect
* Thu Jan 03 2008 Clark Williams <williams@redhat.com> - 0.18-1
- Initial build.