sched: add new timeout class for peer transmissions

This allows transmissions in symmetric mode to be scheduled
independently from client transmissions. This reduces maximum delay
in scheduling when chronyd is configured with a larger number of
servers.
This commit is contained in:
Miroslav Lichvar 2017-08-08 13:27:30 +02:00
parent c2773dbc2f
commit 1c51feb3c5
2 changed files with 4 additions and 2 deletions

View file

@ -427,7 +427,8 @@ restart_timeout(NCR_Instance inst, double delay)
/* Start new timer for transmission */
inst->tx_timeout_id = SCH_AddTimeoutInClass(delay, get_separation(inst->local_poll),
SAMPLING_RANDOMNESS,
SCH_NtpSamplingClass,
inst->mode == MODE_CLIENT ?
SCH_NtpClientClass : SCH_NtpPeerClass,
transmit_timeout, (void *)inst);
}

View file

@ -34,7 +34,8 @@ typedef unsigned int SCH_TimeoutID;
typedef enum {
SCH_ReservedTimeoutValue = 0,
SCH_NtpSamplingClass,
SCH_NtpClientClass,
SCH_NtpPeerClass,
SCH_NtpBroadcastClass,
SCH_NumberOfClasses /* needs to be last */
} SCH_TimeoutClass;