• Carsten Emde's avatar
    ftrace: Consider shared max priority in latency histograms · 16731e6f
    Carsten Emde authored
    The algorithm used so far to trace the process with the highest priority
    requires that no other processes with the same priority are being woken
    up simultaneously. Otherwise, a process with a lower priority may be
    picked up for tracing which leads to an erroneously high latency value.
    
    Generally, the wakeup latency of a process that exclusively uses the
    highest priority of the system is due to software or hardware issues we
    would like to solve or, at least, keep as small as possible. This is
    what latency measurements are made for, after all. The wakeup latency of
    a process that shares the highest priority of the system with other
    processes, is quite another story. It may contain the worst-case runtime
    durations of the other processes; thus, it is the result of the priority
    design of a given system and nothing a kernel developer or hardware
    engineer may want to fix.
    
    This said, we need to separately record latencies i) of processes that
    exclusively use the highest priority of the system and ii) of processes
    that share the highest priority of the system with other processes.
    
    The above mentioned shortcoming of the tracing algorithm also applies to
    the variable tracing_max_latency that the wakeup latency tracer uses,
    since it is based on the same procedure as the original version of the
    latency histogram. In consequence, if several processes share the
    highest priority of the system, the variable tracing_max_latency may
    contain erroneously high values. We could now patch the wakeup latency
    tracer as well and separately record the various latencies, but we
    better document this behavior and recommend the latency histograms to
    reliably determine a system's worst-case wakeup latency.
    
    Simplified and cleaned up a bit. Added some more help info to Kconfig.
    Signed-off-by: default avatarCarsten Emde <C.Emde@osadl.org>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    16731e6f
histograms.txt 5.7 KB