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

NAME

6       hwlatdetect - program to control the ftrace kernel hardware latency de‐
7       tection
8

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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

AUTHOR

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