1HWLATDETECT(8)              System Manager's Manual             HWLATDETECT(8)
2
3
4

NAME

6       hwlatdetect  -  program  to  control the ftrace kernel hardware latency
7       detection
8

SYNOPSIS

10       hwlatdetect  [  --duration=<time>  ]  [--threshold=<usecs>  ]   [--win‐
11       dow=<time      interval>      ]      [--width=<time     interval>     ]
12       [--hardlimit=<microsecond  value>  ]  [--report=<path>  ]  [--debug   ]
13       [--quiet ] [--watch]
14
15

DESCRIPTION

17       hwlatdetect  is  a  program  that  controls  the ftrace kernel hardware
18       latency detector (hwlatdetector).hwlatdetector is used to detect  large
19       system latencies induced by the behavior of certain underlying hardware
20       or firmware, independent of Linux itself.  The code was developed orig‐
21       inally  to  detect  SMIs (System Management Interrupts) on x86 systems,
22       however there is nothing x86 specific  about  it.   It  was  originally
23       written  for  use  by  the "RT" patch set since the Real Time kernel is
24       highly latency sensitive.
25
26       SMIs are usually not serviced by the Linux kernel, which typically does
27       not  even  know that they are occurring. SMIs are instead are set up by
28       BIOS code and are serviced by BIOS code, usually for "critical"  events
29       such  as management of thermal sensors and fans. Sometimes though, SMIs
30       are used for other tasks and those tasks can spend an inordinate amount
31       of  time in the handler (sometimes measured in milliseconds). Obviously
32       this is a problem if you are trying to  keep  event  service  latencies
33       down in the microsecond range.
34
35       The  ftrace  hardware latency detector works by hogging all of the cpus
36       for configurable amounts of time (by calling  stop_machine()),  polling
37       the  CPU  Time  Stamp Counter for some period, then looking for gaps in
38       the TSC data. Any gap indicates a time when the polling was interrupted
39       and  since  the  machine  is stopped and interrupts turned off the only
40       thing that could do that would be an SMI.
41
42       The hwlatdetector script manages the mounting/unmounting of the debugfs
43       as  well as interacting with the ftrace hwlatdetector If the debugfs is
44       already mounted then hwlatdetector will not unmount it after a run.
45
46

OPTIONS

48       --duration=<time>{s,m,d}
49              Run the detector logic in for the specified duration. The  dura‐
50              tion  is  a  base  10 integer number that defaults to a value in
51              seconds. An optional suffix may be specified  to  indicate  min‐
52              utes, hours or days.
53
54
55       --threshold=<microsecond value>
56              Specify the TSC gap used to detect an SMI. Any gap value greater
57              than <threshold> is considered to be the result of an SMI occur‐
58              ring.
59
60
61       --hardlimit=<microsecond value>
62              The  test  is  considered to fail if a value above the hardlimit
63              occurs.  This affects the exit value of hwlatdetect
64
65
66       --window=<time value>{us,ms,s,m,d}
67              specify the size of the sample window. Converted to microseconds
68              when passed to the kernel.
69
70
71       --width=<time value>{us,ms,s,m,d}
72              The  amount  of time within the sample window where the detector
73              is actually sampling. Must be less than the --window value.
74
75       --report=FILENAME
76              Specify the output filename  of  the  detector  report.  Default
77              behavior is to print to standard output
78
79       --debug
80              Turn on debug prints
81
82       --quiet
83              Turn off all information prints
84
85       --watch
86              print sample data to stdout as it arrives
87
88

AUTHOR

90       hwlatdetect was written by Clark Williams <williams@redhat.com>
91       hwlat_detector.ko was written by Jon Masters <jcm@redhat.com>
92
93
94
95                                 May  12, 2009                  HWLATDETECT(8)
Impressum