linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rt-tests: hwlatdetect: Remove kmodule options and clean-up help
@ 2019-08-14 13:50 John Kacur
  2019-08-14 13:50 ` [PATCH 2/2] rt-tests: cyclictest: Without -t default to 1 thread in numa case John Kacur
  0 siblings, 1 reply; 2+ messages in thread
From: John Kacur @ 2019-08-14 13:50 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

hwlatdetect has used the ftrace hwlatdetector for quite sometime. When
we first moved away from our own kernel module, it was still possible to
force the use of the module for testing. This was useful for development
but is no longer supported. This patch does the following things.

- Remove references to the kmodule from the help option and the man
page.
- Remove support from the program to force loading of the module.
- Cleans up some differences between the manpage and the program help,
for example, adds the --hardlimit option to man page and removes the
--cleanup of the kmodule option

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/hwlatdetect/hwlatdetect.8  | 43 +++++++++++++++++-----------------
 src/hwlatdetect/hwlatdetect.py | 12 +---------
 2 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/src/hwlatdetect/hwlatdetect.8 b/src/hwlatdetect/hwlatdetect.8
index 645fb7d8e6c1..df331800d5cf 100644
--- a/src/hwlatdetect/hwlatdetect.8
+++ b/src/hwlatdetect/hwlatdetect.8
@@ -13,12 +13,13 @@
 .\" .sp <n>    insert n+1 empty lines
 .\" for manpage-specific macros, see man(7)
 .SH NAME
-hwlatdetect \- program to control the kernel hardware latency detection module
+hwlatdetect \- program to control the ftrace kernel hardware latency detection
 .SH SYNOPSIS
 .B hwlatdetect
 .RI "[ \-\-duration=<time> ] [\-\-threshold=<usecs> ] \
-[\-\-window=<time interval> ] [\-\-width=<time interval> ] [\-\-report=<path> ] \
-[\-\-cleanup ] [\-\-debug ] [\-\-quiet ] [--watch]
+[\-\-window=<time interval> ] [\-\-width=<time interval> ] \
+[\-\-hardlimit=<microsecond value> ] [\-\-report=<path> ] \
+[\-\-debug ] [\-\-quiet ] [--watch]
 
 .\" .SH DESCRIPTION
 .\" This manual page documents briefly the
@@ -27,15 +28,14 @@ hwlatdetect \- program to control the kernel hardware latency detection module
 .\" \fI<whatever>\fP escape sequences to invoke bold face and italics, respectively.
 .\" \fBhwlatdetect\fP is a program that...
 .SH DESCRIPTION
-\fBhwlatdetect\fP is a program that controls the kernel hardware
-latency detector module (hwlat_detector.ko). The module is a special
-purpose kernel module that is used to detect large system latencies
-induced by the behavior of certain underlying hardware or firmware,
-independent of Linux itself. The code was developed originally to
-detect SMIs (System Management Interrupts) on x86 systems, however
-there is nothing x86 specific about this patchset. It was originally
-written for use by the "RT" patch since the Real Time kernel is highly
-latency sensitive. 
+\fBhwlatdetect\fP is a program that controls the ftrace kernel hardware
+latency detector (hwlatdetector).hwlatdetector is used to detect large
+system latencies induced by the behavior of certain underlying hardware
+or firmware, independent of Linux itself.
+The code was developed originally to detect SMIs (System Management Interrupts)
+on x86 systems, however there is nothing x86 specific about it.
+It was originally written for use by the "RT" patch set
+since the Real Time kernel is highly latency sensitive. 
 
 SMIs are usually not serviced by the Linux kernel, which typically does not
 even know that they are occurring. SMIs are instead are set up by BIOS code
@@ -45,7 +45,7 @@ other tasks and those tasks can spend an inordinate amount of time in the
 handler (sometimes measured in milliseconds). Obviously this is a problem if
 you are trying to keep event service latencies down in the microsecond range.
 
-The hardware latency detector module works by hogging all of the cpus
+The ftrace hardware latency detector works by hogging all of the cpus
 for configurable amounts of time (by calling stop_machine()), polling
 the CPU Time Stamp Counter for some period, then looking for gaps in
 the TSC data. Any gap indicates a time when the polling was
@@ -53,10 +53,9 @@ interrupted and since the machine is stopped and interrupts turned off
 the only thing that could do that would be an SMI. 
 
 The hwlatdetector script manages the mounting/unmounting of the
-debugfs as well as the loading/unloading of the hwlat_detector
-module. If the debugfs is already mounted then hwlatdetector will not
-unmount it after a run. Likewise, if the hwlat_detector module is
-already loaded, it will not be unloaded after a run. 
+debugfs as well as interacting with the ftrace hwlatdetector
+If the debugfs is already mounted then hwlatdetector will not
+unmount it after a run.
 
 .SH OPTIONS
 .TP
@@ -70,10 +69,15 @@ optional suffix may be specified to indicate minutes, hours or days.
 Specify the TSC gap used to detect an SMI. Any gap value greater than
 <threshold> is considered to be the result of an SMI occurring. 
 
+.TP
+.B \-\-hardlimit=<microsecond value>
+The test is considered to fail if a value above the hardlimit occurs.
+This affects the exit value of hwlatdetect
+
 .TP
 .B \-\-window=<time value>{us,ms,s,m,d}
 specify the size of the sample window. Converted to microseconds when
-passed to the kernel module.
+passed to the kernel.
 
 .TP
 .B \-\-width=<time value>{us,ms,s,m,d}
@@ -84,9 +88,6 @@ actually sampling. Must be less than the \-\-window value.
 Specify the output filename of the detector report. Default
 behavior is to print to standard output
 .TP
-.B \-\-cleanup
-Force unload of hwlat_detector.ko and unmounting of debugfs filesystem.
-.TP
 .B \-\-debug
 Turn on debug prints
 .TP
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
index b72bdc3aa930..c11a6f8ea5b1 100755
--- a/src/hwlatdetect/hwlatdetect.py
+++ b/src/hwlatdetect/hwlatdetect.py
@@ -542,10 +542,6 @@ if __name__ == '__main__':
                         dest="watch",
                         help="print sample data to stdout as it arrives")
 
-    parser.add_argument("--kmodule", action="store_true", default=False,
-                        dest="kmodule",
-                        help="force using the kernel module")
-
     args = parser.parse_args()
 
     # need these before creating detector instance
@@ -558,13 +554,7 @@ if __name__ == '__main__':
         quiet = True
         debugging = False
 
-    if args.kmodule:
-        detect = Hwlat()
-    else:
-        try:
-            detect = Tracer()
-        except DetectorNotAvailable as err:
-            detect = HwLat()
+    detect = Tracer()
 
     if args.threshold:
         t = microseconds(args.threshold)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-14 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 13:50 [PATCH 1/2] rt-tests: hwlatdetect: Remove kmodule options and clean-up help John Kacur
2019-08-14 13:50 ` [PATCH 2/2] rt-tests: cyclictest: Without -t default to 1 thread in numa case John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).