mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 00:05:06 -05:00
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.
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#define DELAY_QUANT_MAX_K 2
|
||||
#define DELAY_QUANT_Q 10
|
||||
#define DELAY_QUANT_REPEAT 7
|
||||
#define DELAY_QUANT_LARGE_STEP_DELAY 1000
|
||||
#define DELAY_QUANT_MIN_STEP 1.0e-9
|
||||
|
||||
struct HCL_Instance_Record {
|
||||
@@ -127,6 +128,7 @@ HCL_CreateInstance(int min_samples, int max_samples, double min_separation, doub
|
||||
clock->precision = precision;
|
||||
clock->delay_quants = QNT_CreateInstance(DELAY_QUANT_MIN_K, DELAY_QUANT_MAX_K,
|
||||
DELAY_QUANT_Q, DELAY_QUANT_REPEAT,
|
||||
DELAY_QUANT_LARGE_STEP_DELAY,
|
||||
DELAY_QUANT_MIN_STEP);
|
||||
|
||||
LCL_AddParameterChangeHandler(handle_slew, clock);
|
||||
|
||||
Reference in New Issue
Block a user