21 Sep, 2016

1 commit

  • This commit introduces a generic library to estimate either the min or
    max value of a time-varying variable over a recent time window. This
    is code originally from Kathleen Nichols. The current form of the code
    is from Van Jacobson.

    A single struct minmax_sample will track the estimated windowed-max
    value of the series if you call minmax_running_max() or the estimated
    windowed-min value of the series if you call minmax_running_min().

    Nearly equivalent code is already in place for minimum RTT estimation
    in the TCP stack. This commit extracts that code and generalizes it to
    handle both min and max. Moving the code here reduces the footprint
    and complexity of the TCP code base and makes the filter generally
    available for other parts of the codebase, including an upcoming TCP
    congestion control module.

    This library works well for time series where the measurements are
    smoothly increasing or decreasing.

    Signed-off-by: Van Jacobson
    Signed-off-by: Neal Cardwell
    Signed-off-by: Yuchung Cheng
    Signed-off-by: Nandita Dukkipati
    Signed-off-by: Eric Dumazet
    Signed-off-by: Soheil Hassas Yeganeh
    Signed-off-by: David S. Miller

    Neal Cardwell