Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 59aa86a9af7204f10def6872e1088d83fc7579bc)
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit b1b7a3886b3859fef72efe52e6bb418393bcf24d)
Signed-off-by: John Kacur <jkacur@redhat.com>
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>
Cylictest's --smi option allows to continuously display SMIs that occur
during the measurement. However, the SMI count was not yet included in the
summary at the end of the program run. Added this.
While we are at it, update the list of Intel family 6 models that support
retrieving the SMI count by copying newly added items from kernel sources
at tools/power/x86/turbostat.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
(cherry picked from commit 34caa080e0)
Signed-off-by: John Kacur <jkacur@redhat.com>
Change 9d2c9edd86 introduces
the new option of POSIX timer and makes MODE_CLOCK_NANOSLEEP
the default choice. But there are two places explicitly set
MODE_CLOCK_NANOSLEEP to the variable use_nanosleep in the code,
so the actual value of the variable after parsing depends on
the position of '-x' to '-U' and '-S'.
These command pairs result in different values in the variable:
'cyclictest -S -x' VS 'cyclictest -x -S'
'cyclictest -U -x' VS 'cyclictest -x -U'
This change ensures -x work regardless its position by removing
the two lines in these cases.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Most of time having '-M' option causes cyclictest won't exit after
a duration ('-D') expires, like this quick command on my machines:
sudo cyclictest -S -M -D2 -d0
This is because the main thread is blocked on waiting for the next
update of MAX, but the timer thread doesn't signal the main thread
before it quits.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
On a numa system we allocate a stack from the closest NUMA node
for each measurement thread. We need to touch those stack pages
to prevent them faulting when first run. Not a big deal on a
system with just a few cores, but overhead adds up with 32+ cores.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
It is recommended that clock_nanosleep should be used for real-time
wherever available. So, make sure that cyclictest runs clock_nanosleep
by default. Added an option to run POSIX timers. Removing the '-n'
option because it is redundant now.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We haven't tested/supported the old smi_detector module since the 2.6 kernel. Remove support for running it.
Signed-off-by: Clark Williams <williams@redhat.com>
- Fixed minor typo where part of he shebang was removed
Signed-off-by: John Kacur <jkacur@redhat.com>
- modify hwlatdetector.py to detect and use the ftrace hwlatdetector
- rewrite using base class for detector
Big rewrite where we create a base Detector class and use that
as the base class for Tracer and Hwlat classes.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We decided it is more interesting, in our automated tests, to have a
higher tolerance to SMI as most of the test boxes are not optimized for
RT. On the other hand, we would like to know how big are the SMI
latencies on these boxes.
This commit adds the --hardlimit parameter, which defines the real
PASS/FAIL latency criteria. Latencies above --threshold will be
annotated, but the test may PASS if the observed latencies are smaller
than --hardlimit.
When --hardlimit is not informed, the value used for --threshold is also
used as the hard limit.
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The short option 's' was originally intended to be the short form of
--system
Commit b35bc97cfd
which added the new option --secaligned broke this, by accidently
inserting the new option between the short form and long form.
Reported-by: Daniel Seemer <phaiax-cyclictest@invisibletower.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix spelling mistake, "that" should be "than" in the following message
For less that 2ms run times, you need to
have HRTICK enabled in debugfs/sched_features
Signed-off-by: John Kacur <jkacur@redhat.com>
Improve message if max latency is below threshold.
If the maximum latency is below the threshold for reporting, 0us is output.
This is confusing, and not accurate, so print the message "Below threshold"
instead.
Suggested-by: Jiri Kastner <jkastner@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Although the interval code was added the 'i' was missing from the getopt
list, and there was no help text for it either.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
- Add cyclicdeadline and deadline_test to the Makefile
- Conditionally define _GNU_SOURCE in the new programs
- Add the new programs to the .gitignore file
Signed-off-by: John Kacur <jkacur@redhat.com>
Add cyclicdeadline and deadline_test - these are two programs written by
Steven Rostedet to test the functionality and performance of
SCHED_DEADLINE
Signed-off-by: John Kacur <jkacur@redhat.com>
Cyclictest's SMI counter implementation is based on the turbostat
tool in the Linux kernel. This patch syncs cyclictest's has_smi_counter()
with turbostat's check.
From turbostat's commits:
cdc5727 tools/power turbostat: initial KBL support
ec53e59 tools/power turbostat: initial SKX support
e4085d5 tools/power turbostat: initial BXT support
[ John & Clark, I did it in the branch devel/v2.0, but we need ]
[ this in the 0.x and 1.x series as well. ]
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
This checklist is no longer relevant. It has a lot of steps that are
distro relevant, and I've removed all of the files that are not distro
independent
Signed-off-by: John Kacur <jkacur@redhat.com>
- smidetect was long ago renamed to hwlatdetct, reflect this in hwlat.txt
- Fix a few spelling mistakes, and add a missing option
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix a number of errors like procesor->processor, specifed->specified and
cylictest->cyclictest.
Note, Uwe Kleine-König <ukleinek@debian.org> pointed out some of these
spelling errors previously.
Signed-off-by: John Kacur <jkacur@redhat.com>
John,
This patch is against the devel/v0.98 branch. It turns off tracing in the tracemark() so that we don't lose information about what was going on when we hit the latency:
The current logic of using --tracemark and --notrace works for running
cyclictest with trace-cmd, but even if we are not doing any trace
manipulation in cyclictest, we still need to stop tracing when we hit a
breaktrace threshold (i.e. -b <n>).
Modify startup logic to hold open file descriptors for the tracemark file
*and* the tracing_on file. When we hit a threshold and call the tracemark()
function, write the marker to the trace buffers and then write a "0\n" to
the tracing_on file to turn off tracing, otherwise we lose the information
immediately prior to the point where we hit the latency.
Signed-off-by: Clark Williams <williams@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We have done a good job keeping cyclictest help up-to-date, but we have
not been actively updating the man page.
There were many missing options, as well as options that don't exist
anymore. To be more precise, some short form options had been removed,
but there are still corresponding long-version options.
This patch contains a considerable amount of updates to the man-page to
keep it in sync, and in some cases it also updates the cyclictest help
where needed. For example, the cyclictest help options were not always
in the proper order. In some cases I changed the wording to make it more
closely correspond to the man page
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
NUMA users should have long ago stepped up to libs that have
numa_parse_cpustring_all(). Make this the default so that we can include
isolated cpus in the affinity string.
If there are any NUMA users or distros left that have old libraries that
don't have numa_parse_cpu_string_all(), and only numa_parse_cpu_string()
they can compile like this
make HAVE_PARSE_CPUSTRING_ALL=0
Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-and-Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
The new --tracemark option can be used to run cyclictest under
trace-cmd.
This means we don't want cyclictest's built-in tracing to be used, so
this option is only compatible with --notrace.
Therefore turn --notrace on if --tracemark is invoked even if the user
doesn't explicitly request this.
Signed-off-by: John Kacur <jkacur@redhat.com>
Commit 3290f8412a changed
exit(-1) to exit(1) for many programs in rt-tests for consistency.
rt-migrate-test needs tri-state exit statuses, because of the way
some existing bash scripts consume it's results.
This could no-doubt be improved in the future, and there are some
inconsistencies in the exit statuses in this program alone, but as they
are not urgent to fix, and the current fix makes things worse, reverting
this for now.
Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
cyclictest will only write to /sys/kernel/debug/tracing/trace_maker
if it's also setup to do tracing. This conflicts with
running cyclictest under trace-cmd.
The --tracemark option tells cyclictest to write to the
trace_marker file even when it's not doing tracing.
It can be used like this:
# trace-cmd record [...] cyclictest [...] -bX --tracemark --notrace
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
A function added by a future commit will want to call
this code too.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
If you pass -b and --notrace to cyclictest today, it will
write to tracing_on when -b latency is reached.
Fix this by making tracing() check notrace.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>