Commit Graph

615 Commits

Author SHA1 Message Date
Clark Williams 47f82f1b44 first stab at removing smp/numa and modifying threads
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit b1b7a3886b3859fef72efe52e6bb418393bcf24d)
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-05-30 00:36:52 +01:00
Clark Williams f5ccfbe4d6 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>
2018-05-30 00:35:37 +01:00
John Kacur e905f555f3 rt-tests: Makefile - New development (unstable) release
Modify the Makefile for a new release

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-30 15:39:26 +01:00
Carsten Emde 57d9076786 rt-tests: Include SMI count in cyclictest summary
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>
2018-04-30 15:38:45 +01:00
John Kacur 62d2e8b40c Merge remote-tracking branch 'marcelowt2/queuelat' into unstable/devel/v1.2
Merging queuelat into rt-tests

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-30 15:27:49 +01:00
John Kacur fa97bdab61 Merge remote-tracking branch 'clrkwllms/hwlatdetect_py3' into unstable/devel/v1.2
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-24 13:45:26 +01:00
marcelo 08d255cb88 queuelat: add statistics print
Add statistics print at the end of each run.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2018-04-18 15:03:14 -03:00
Marcelo Tosatti 9e41e33d94 Add queuelat test to rt-tests
Add queuelat, a test to simulate a DPDK queue.

See README in src/queuelat/ for details.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2018-04-16 20:30:25 -03:00
John Kacur 59d86812cc rt-tests: Makefile
Tag v1.2 in order to start some new development

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-03-26 22:51:25 +01:00
Clark Williams 809eed92c1 hwlatdetect: convert from optparse to argparse for python3
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:30:04 -06:00
Clark Williams 61d21a918b hwlatdetect: fix str/binary mismatches
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:29:53 -06:00
Clark Williams 9a5c9c514d hwlatdetect: initial python3 changes
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:29:44 -06:00
John Kacur e5bca09eb8 rt-tests: Need to generate debug info for rpms
Need to generate debug info for rpms, use -g even for non-debug version

Signed-off-by: John Kacur <jkacur@redhat.com>
2017-12-20 17:48:24 +00:00
Jianxun Zhang 44de1a4945 Make -x option position-agnostic
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>
2017-05-15 16:47:46 +02:00
Jianxun Zhang 470b7394e6 cyclictest: cannot stop running with '-M' option
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>
2017-05-04 14:31:27 +02:00
Clark Williams 193ed3d12e cyclictest: touch threadstacks on numa to pre-fault them
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>
2017-04-24 21:51:31 +02:00
Vedang Patel 9d2c9edd86 cyclictest: make clock_nanosleep as default and add option for POSIX timers.
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>
2017-04-11 16:43:53 +02:00
Clark Williams 3d74bddbc0 hwlatdetect: removed smi_detector support
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>
2017-03-22 13:32:25 +01:00
Clark Williams 7c10eeecf9 hwlatdetect: modify hwlatdetector.py to use the ftrace hwlatdetector
- 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>
2017-03-22 13:30:31 +01:00
Clark Williams c9706d9861 hwlatdetect: Add --hardlimit to define the real test failing criteria
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>
2017-03-20 22:19:30 +01:00
John Kacur 4c0e5dc2d9 rt-tests: cyclictest: Correct short option 's'
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>
2016-10-28 15:43:21 +02:00
John Kacur d9aaae16e7 rt-tests: cyclicdeadline: Fix minor spelling mistake
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>
2016-10-28 15:39:16 +02:00
John Kacur 7818ecdae0 rt-tests: hwlatdetect: Improve message if max latency is below threshold
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>
2016-08-18 16:42:35 +01:00
Steven Rostedt (Red Hat) f2503b53fe rt-tests: deadline_test: Made '-i' work and added help text for it
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>
2016-06-30 15:55:06 +02:00
John Kacur 02b15d056e rt-tests-1.1.1: Remove _GNU_SOURCE from source files
Remove _GNU_SOURCE from source files since it is defined in the Makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-24 13:34:54 +02:00
John Kacur ba6cf8f41e rt-tests: Add cyclicdeadline and deadline_test to the Make system
- 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>
2016-06-23 13:51:00 +02:00
John Kacur b4e54ae39c rt-tests: Add cyclicdeadline and deadline_test
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>
2016-06-23 13:31:37 +02:00
John Kacur c8ce47ae17 rt-tests: Makefile, change version to 1.1
Rethinking the naming scheme, so changing the development line from 2.0
to 1.1

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-23 12:49:32 +02:00
Daniel Bristot de Oliveira 068fa14c41 cyclictest: new CPUs with SMI counter support
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>
2016-05-31 10:41:07 +02:00
John Kacur dff174f994 rt-tests: Makefile: Add missing install of rt-migrate-test.8 man page
Add missing install of rt-migrate-test.8 man page

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-14 00:02:56 +02:00
John Kacur e1b1537a20 rt-tests: Create a new unstable line called devel/rt-tests-2.0
Bump the Version number and create a devel/2.0 branch

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13 22:34:14 +02:00
John Kacur bddffd32c9 rt-tests: Makefile - bump version to 1.0
We've arrived, it's version 1.0!

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13 20:30:12 +02:00
John Kacur fc5aa706b0 rt-tests: Remove doc/release-checklist.txt
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>
2016-05-13 20:28:39 +02:00
John Kacur 02d36d03fa rt-tests: hwlat.txt: smidetect renamed to hwlatdetect
- 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>
2016-05-13 15:24:39 +02:00
John Kacur 4594d66e78 rt-tests: Housekeeping fix some spelling errors.
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>
2016-05-13 14:54:13 +02:00
John Kacur e09c5cf849 rt-tests: Add missing option to hwlatdetect man page
Add --watch to the man page. Correct a few spelling errors at the same
time.

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13 14:35:27 +02:00
Clark Williams 3be3cbefcc cyclictest: stop any tracing after hitting a breaktrace threshold
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>
2016-05-04 15:46:32 +02:00
John Kacur b7b2fcca41 rt-tests: Update the cyclictest man page
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>
2016-04-25 18:45:28 +02:00
John Kacur 02d5563612 rt-tests: Add man page for rt-migrate-test
Added a man page for rt-migrate-test
Fairly minimal, based on the output from the --help option

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-04-21 23:10:26 +02:00
John Kacur 81a948a2a6 rt-tests: Makefile: Assume numa_parse_cpustring_all available
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>
2016-04-21 22:41:45 +02:00
John Kacur 0e8a13a646 rt-tests: Makefile: Bump version number to 0.97
Bump version number to v0.97 for the next release

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-31 18:40:54 +02:00
John Kacur ba4dd1bf54 cyclictest: Make the tracemark option imply notrace
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>
2016-03-24 16:27:12 +01:00
John Kacur 967cb01bd7 Revert changes to rt-migrate-test for exit(1)
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>
2016-03-24 16:26:32 +01:00
Luiz Capitulino 39889fd0b2 cyclictest: add --tracemark option
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>
2016-03-24 14:57:51 +01:00
Luiz Capitulino a638701a18 cyclictest: move debugfs init code to its own function
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>
2016-03-22 15:39:33 +01:00
Luiz Capitulino 42596a70b4 cyclictest: tracing(): check for notrace
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>
2016-03-22 15:37:00 +01:00
Luiz Capitulino c20e8c2c55 cyclictest: move tracemark_fd handling to its own function
A function added by the next commit will want to call
this code too.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22 15:33:22 +01:00
Luiz Capitulino 3290f8412a don't use exit(-1) for failures
The kernel uses only 8 bits of the status as a return
code, so this actually becomes 255 in the shell.

In any case, the most widely convension is exit(1)
for failures, so let's be consistent.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22 15:13:03 +01:00
Daniel Bristot de Oliveira 1a1be10bbd cyclictest: Add --smi description on cyclictest man page
Add the description of the --smi comand line option of cyclictest.

"--smi  Enable SMI count/detection on processors with SMI count support."

Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2016-02-09 15:01:04 +01:00
Daniel Bristot de Oliveira fc7e151a5a cyclictest: SMI count/detection via MSR/SMI counter
Use the MSR/SMI counter on Intel's processor to detect/count SMIs. It is
based on turbostat's implementation.

SMI counting is enabled via --smi argument. When enabled, and additional
field is added on both regular and verbose ouput.

On the regular output, a SMI column shows how many SMIs occurred on
each CPU during cyclictest's execution. For example:

policy: fifo: loadavg: 0.09 0.05 0.02 1/194 2288

T: 0 ( 2285) P:80 I:1000 C:   9975 Min:      2 Act:    3 Avg:    4 Max:   20831 SMI:       2
T: 1 ( 2286) P:80 I:1500 C:   6650 Min:      2 Act:    2 Avg:    5 Max:   19910 SMI:       2
T: 2 ( 2287) P:80 I:2000 C:   4987 Min:      2 Act:    2 Avg:    6 Max:   20811 SMI:       2
T: 3 ( 2288) P:80 I:2500 C:   3990 Min:      2 Act:    3 Avg:    7 Max:   20322 SMI:       2

On verbose output, the last column shows how many SMIs occurred
on each loop. For example:

[  CPU  |   Loop |   Lat |  SMIs  ]
       0:    2156:       2       0
       0:    2157:       2       0
       0:    2158:       2       0
       0:    2159:   20981       2
       1:    1433:       2       0
       1:    1434:       2       0
       1:    1435:       2       0
       1:    1436:       3       0
       1:    1437:       2       0
       1:    1438:       2       0
       1:    1439:   20249       2

Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2016-02-09 15:00:37 +01:00