1 ========================= 2 Hardware Latency Detector 3 ========================= 4 5 Introduction 6 ------------- 7 8 The tracer hwlat_detector is a special purpose 9 detect large system latencies induced by the b 10 hardware or firmware, independent of Linux its 11 originally to detect SMIs (System Management I 12 however there is nothing x86 specific about th 13 originally written for use by the "RT" patch s 14 kernel is highly latency sensitive. 15 16 SMIs are not serviced by the Linux kernel, whi 17 even know that they are occurring. SMIs are in 18 and are serviced by BIOS code, usually for "cr 19 management of thermal sensors and fans. Someti 20 other tasks and those tasks can spend an inord 21 handler (sometimes measured in milliseconds). 22 you are trying to keep event service latencies 23 24 The hardware latency detector works by hogging 25 amounts of time (with interrupts disabled), po 26 for some period, then looking for gaps in the 27 time when the polling was interrupted and sinc 28 the only thing that could do that would be an 29 (or an NMI, but those can be tracked). 30 31 Note that the hwlat detector should *NEVER* be 32 It is intended to be run manually to determine 33 problem with long system firmware service rout 34 35 Usage 36 ------ 37 38 Write the ASCII text "hwlat" into the current_ 39 (mounted at /sys/kernel/tracing or /sys/kernel 40 redefine the threshold in microseconds (us) ab 41 be taken into account. 42 43 Example:: 44 45 # echo hwlat > /sys/kernel/tracing/cur 46 # echo 100 > /sys/kernel/tracing/traci 47 48 The /sys/kernel/tracing/hwlat_detector interfa 49 50 - width - time period to sample with CPUs he 51 must be less than the total window 52 - window - total period of sampling, width b 53 54 By default the width is set to 500,000 and win 55 for every 1,000,000 usecs (1s) the hwlat detec 56 (0.5s). If tracing_thresh contains zero when h 57 change to a default of 10 usecs. If any latenc 58 observed then the data will be written to the 59 60 The minimum sleep time between periods is 1 mi 61 is less than 1 millisecond apart from window, 62 be totally starved. 63 64 If tracing_thresh was zero when hwlat detector 65 back to zero if another tracer is loaded. Note 66 tracing_thresh that hwlat detector had will be 67 be restored in tracing_thresh if it is still z 68 started again. 69 70 The following tracing directory files are used 71 72 in /sys/kernel/tracing: 73 74 - tracing_threshold - minimum latency valu 75 - tracing_max_latency - maximum hardware lat 76 - tracing_cpumask - the CPUs to move the 77 - hwlat_detector/width - specified amount of 78 - hwlat_detector/window - amount of ti 79 - hwlat_detector/mode - the thread mode 80 81 By default, one hwlat detector's kernel thread 82 specified in cpumask at the beginning of a new 83 fashion. This behavior can be changed by chang 84 the available options are: 85 86 - none: do not force migration 87 - round-robin: migrate across each CPU specif 88 - per-cpu: create one thread for each cpu
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.