]> git.ipfire.org Git - thirdparty/chrony.git/commit
quantiles: add parameter to limit negative step
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 21 Nov 2024 13:30:14 +0000 (14:30 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 21 Nov 2024 15:00:23 +0000 (16:00 +0100)
commitd22c8fbcb280aeab749f56b5f21ced1b51c17c11
tree932478268b954a58ed900892090fd2481ada2905
parent2da4e3ce53cabe7b8c06817b8432fbfff90f101b
quantiles: add parameter to limit negative step

Add a new parameter to limit the negative value of the step state
variable. It's set as a maximum delay in number of updates before the
actual step applied to the quantile estimate starts growing from the
minimum step when the input value is consistently larger or smaller than
the estimate.

This prevents the algorithm from effectively becoming the slower 1U
variant if the quantile estimate is stable most of the time.

Set it to 100 updates for the NTP delay and 1000 updates for the hwclock
delay. An option could be added later to make it configurable.
hwclock.c
ntp_core.c
quantiles.c
quantiles.h
test/unit/quantiles.c