Skip to content

Commit

Permalink
trace doc: convert trace/hwlat_detector.txt to rst fromat
Browse files Browse the repository at this point in the history
This converts the plain text documentation to reStructuredText format and
add it into Sphinx TOC tree. No essential content change.

Cc: Steven Rostedt <[email protected]>
Signed-off-by: Changbin Du <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Changbin Du authored and Jonathan Corbet committed Mar 7, 2018
1 parent ed657c1 commit 8df2d75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Introduction:
=========================
Hardware Latency Detector
=========================

Introduction
-------------

The tracer hwlat_detector is a special purpose tracer that is used to
Expand Down Expand Up @@ -28,24 +32,24 @@ Note that the hwlat detector should *NEVER* be used in a production environment.
It is intended to be run manually to determine if the hardware platform has a
problem with long system firmware service routines.

Usage:
Usage
------

Write the ASCII text "hwlat" into the current_tracer file of the tracing system
(mounted at /sys/kernel/tracing or /sys/kernel/tracing). It is possible to
redefine the threshold in microseconds (us) above which latency spikes will
be taken into account.

Example:
Example::

# echo hwlat > /sys/kernel/tracing/current_tracer
# echo 100 > /sys/kernel/tracing/tracing_thresh

The /sys/kernel/tracing/hwlat_detector interface contains the following files:

width - time period to sample with CPUs held (usecs)
must be less than the total window size (enforced)
window - total period of sampling, width being inside (usecs)
- width - time period to sample with CPUs held (usecs)
must be less than the total window size (enforced)
- window - total period of sampling, width being inside (usecs)

By default the width is set to 500,000 and window to 1,000,000, meaning that
for every 1,000,000 usecs (1s) the hwlat detector will spin for 500,000 usecs
Expand All @@ -67,11 +71,11 @@ The following tracing directory files are used by the hwlat_detector:

in /sys/kernel/tracing:

tracing_threshold - minimum latency value to be considered (usecs)
tracing_max_latency - maximum hardware latency actually observed (usecs)
tracing_cpumask - the CPUs to move the hwlat thread across
hwlat_detector/width - specified amount of time to spin within window (usecs)
hwlat_detector/window - amount of time between (width) runs (usecs)
- tracing_threshold - minimum latency value to be considered (usecs)
- tracing_max_latency - maximum hardware latency actually observed (usecs)
- tracing_cpumask - the CPUs to move the hwlat thread across
- hwlat_detector/width - specified amount of time to spin within window (usecs)
- hwlat_detector/window - amount of time between (width) runs (usecs)

The hwlat detector's kernel thread will migrate across each CPU specified in
tracing_cpumask between each window. To limit the migration, either modify
Expand Down
1 change: 1 addition & 0 deletions Documentation/trace/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Linux Tracing Technologies
events-nmi
events-msr
mmiotrace
hwlat_detector

0 comments on commit 8df2d75

Please sign in to comment.